Use CDATA for note descriptions in the RSS feed
authorTom Hughes <tom@compton.nu>
Tue, 7 May 2013 10:30:13 +0000 (11:30 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 7 May 2013 10:30:13 +0000 (11:30 +0100)
app/views/notes/feed.rss.builder

index f17be09..df35b70 100644 (file)
@@ -25,7 +25,9 @@ xml.rss("version" => "2.0",
         xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :only_path => false)
         xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :only_path => false)
 
-        xml.description render(:partial => "entry", :object => comment, :formats => [ :html ])
+        xml.description do
+          xml.cdata! render(:partial => "entry", :object => comment, :formats => [ :html ])
+        end
 
         if comment.author
           xml.author comment.author.display_name