changeset 168:0c60db0a3686

Less escaping, more xhtml
author nanaya <me@nanaya.pro>
date Wed, 08 Aug 2018 19:52:06 +0900
parents 522d832d8a8c
children 04ca6c4f11d0
files app/views/tweets/_tweet.atom.erb
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/tweets/_tweet.atom.erb	Fri Aug 03 03:25:31 2018 +0900
+++ b/app/views/tweets/_tweet.atom.erb	Wed Aug 08 19:52:06 2018 +0900
@@ -4,8 +4,10 @@
   <updated><%= tweet.created_at.xmlschema %></updated>
   <link rel="alternate" type="text/html" href="<%= tweet.uri %>"/>
   <title><%= ellipsize tweet.attrs[:full_text] %></title>
-  <content type="html">
-    <%= render(:partial => "tweet", :formats => :html, :locals => { :tweet => tweet }).to_str %>
+  <content type="xhtml">
+    <div xmlns="http://www.w3.org/1999/xhtml">
+      <%= render :partial => "tweet", :formats => :html, :locals => { :tweet => tweet } %>
+    </div>
   </content>
   <author>
     <name><%= tweet.user.screen_name %></name>