diff options
Diffstat (limited to 'app/helpers/content_helper.rb')
| -rw-r--r-- | app/helpers/content_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 7286976f..17364f8b 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -43,7 +43,7 @@ module ContentHelper | |||
| 43 | # Returns the published_at attribute of a page if it is not nil, otherwise | 43 | # Returns the published_at attribute of a page if it is not nil, otherwise |
| 44 | # it returns the auto-filled value of the created_at attribute | 44 | # it returns the auto-filled value of the created_at attribute |
| 45 | def date_for_page page | 45 | def date_for_page page |
| 46 | page.published_at.to_s(:db) rescue page.created_at.to_s(:db) | 46 | I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc) |
| 47 | end | 47 | end |
| 48 | 48 | ||
| 49 | def author_for_page page | 49 | def author_for_page page |
| @@ -80,10 +80,10 @@ module ContentHelper | |||
| 80 | begin | 80 | begin |
| 81 | if content =~ /<aggregate([^<>]*)>/ | 81 | if content =~ /<aggregate([^<>]*)>/ |
| 82 | tag = $~.to_s | 82 | tag = $~.to_s |
| 83 | matched_data = $1.scan(/\w+\=\"[a-zA-Z\s\/_\d,]*\"/) | 83 | matched_data = $1.scan(/\w+\=\"[a-zA-Z\s\/_\d,.=]*\"/) |
| 84 | 84 | ||
| 85 | matched_data.each do |data| | 85 | matched_data.each do |data| |
| 86 | splitted_data = data.split("=") | 86 | splitted_data = data.split("=", 2) |
| 87 | options[splitted_data[0].to_sym] = splitted_data[1].gsub(/\"/, "") | 87 | options[splitted_data[0].to_sym] = splitted_data[1].gsub(/\"/, "") |
| 88 | end | 88 | end |
| 89 | 89 | ||
