summaryrefslogtreecommitdiff
path: root/app/helpers/content_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/content_helper.rb')
-rw-r--r--app/helpers/content_helper.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index d6c96f17..7286976f 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -9,13 +9,13 @@ module ContentHelper
9 end 9 end
10 10
11 def calendar 11 def calendar
12 occurrences = Occurrence.find_in_range(Time.now, (Time.now+14.days)) 12 occurrences = Occurrence.find_in_range(Time.now, (Time.now+6.weeks))
13 13
14 if occurrences.empty? 14 if occurrences.empty?
15 occurrences = Occurrence.find_next 15 occurrences = Occurrence.find_next
16 end 16 end
17 17
18 occurrences = occurrences.reject { |o| o.node.head.nil? } 18 occurrences = occurrences.reject { |o| o.node.nil? || o.node.head.nil? }
19 19
20 render( 20 render(
21 :partial => 'content/front_page_calendar', 21 :partial => 'content/front_page_calendar',
@@ -75,6 +75,8 @@ module ContentHelper
75 def aggregate? content 75 def aggregate? content
76 options = {} 76 options = {}
77 77
78 cccms_attributes = ActionView::Base.sanitized_allowed_attributes + [ 'lang' ]
79
78 begin 80 begin
79 if content =~ /<aggregate([^<>]*)>/ 81 if content =~ /<aggregate([^<>]*)>/
80 tag = $~.to_s 82 tag = $~.to_s
@@ -87,13 +89,13 @@ module ContentHelper
87 89
88 options[:partial] = select_partial( options[:partial] ) 90 options[:partial] = select_partial( options[:partial] )
89 91
90 sanitize( content.sub(tag, render_collection(options)) ) 92 sanitize( content.sub(tag, render_collection(options)), :attributes => cccms_attributes )
91 else 93 else
92 sanitize( content ) 94 sanitize( content, :attributes => cccms_attributes )
93 end 95 end
94 96
95 rescue 97 rescue
96 sanitize( content ) 98 sanitize( content, :atttributes => cccms_attributes )
97 end 99 end
98 end 100 end
99 101