Mercurial > rsstweet
diff app/views/tweets/_tweet.html.erb @ 172:df4be896ab8b
Improved escaping and truncating
author | nanaya <me@nanaya.pro> |
---|---|
date | Wed, 08 Aug 2018 20:37:29 +0900 |
parents | 04ca6c4f11d0 |
children | d35dbc09bd83 |
line wrap: on
line diff
--- a/app/views/tweets/_tweet.html.erb Wed Aug 08 20:19:51 2018 +0900 +++ b/app/views/tweets/_tweet.html.erb Wed Aug 08 20:37:29 2018 +0900 @@ -13,11 +13,11 @@ <p> <%# FIXME: Twitter gem doesn't support extended mode when writing this %> - <%= auto_link(expand_url( - tweet.attrs[:full_text].printable, + <%= auto_link(html_escape(expand_url( + tweet.unescaped_text, tweet.attrs[:entities][:urls], tweet.attrs[:entities][:media] - )) + ))) .gsub("\n", "<br />") .html_safe %>