Mercurial > rsstweet
diff app/views/tweets/_tweet.atom.erb @ 211:e07f6ea17deb
Less xhtml more escaping
It looks like some older tweets aren't quite escaped properly for xhtml.
Example (assuming not deleted): https://twitter.com/aaaa/status/169688458900668416
author | nanaya <me@nanaya.pro> |
---|---|
date | Fri, 11 Dec 2020 03:31:25 +0900 |
parents | 70e90ea4b870 |
children | 7a773720d81f |
line wrap: on
line diff
--- a/app/views/tweets/_tweet.atom.erb Mon Oct 19 14:31:33 2020 +0900 +++ b/app/views/tweets/_tweet.atom.erb Fri Dec 11 03:31:25 2020 +0900 @@ -4,10 +4,8 @@ <updated><%= tweet.created_at.xmlschema %></updated> <link rel="alternate" type="text/html" href="<%= status_url(tweet) %>"/> <title><%= truncate tweet.unescaped_text, :length => 30 %></title> - <content type="xhtml"> - <div xmlns="http://www.w3.org/1999/xhtml"> - <%= render :partial => "tweet", :formats => :html, :locals => { :tweet => tweet } %> - </div> + <content type="html"> + <%= render(:partial => "tweet", :formats => :html, :locals => { :tweet => tweet }).to_str %> </content> <author> <name><%= tweet.user.screen_name %></name>