diff options
author | rhenium <re4k@re4k.info> | 2013-05-20 01:00:17 +0900 |
---|---|---|
committer | rhenium <re4k@re4k.info> | 2013-05-20 01:00:17 +0900 |
commit | 68067759446f9101b92932f81f55c698bb54047a (patch) | |
tree | d3823a5d8e96e62b7e269f2069a97fccc6f4a1f0 /app | |
parent | 1aede390bc4f6ecbd81a5a4d354e8ac25b3435c3 (diff) | |
download | aclog-68067759446f9101b92932f81f55c698bb54047a.tar.gz |
unescape title, text: tweet text is HTML escaped
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/views/tweets/_tweets.rss.builder | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8ef84e4..a94b0af 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -48,11 +48,11 @@ module ApplicationHelper end def caption - "#{@caption}" + CGI.unescapeHTML "#{@caption}" end def title - "#{@title || @caption} - aclog" + CGI.unescapeHTML "#{@title || @caption} - aclog" end # utf8, form diff --git a/app/views/tweets/_tweets.rss.builder b/app/views/tweets/_tweets.rss.builder index 5c5afe7..4fea26a 100644 --- a/app/views/tweets/_tweets.rss.builder +++ b/app/views/tweets/_tweets.rss.builder @@ -7,7 +7,7 @@ xml.rss version: "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom" do xml.__send__(:"atom:link", rel: "self", href: request.url, type: "application/rss+xml") @tweets.each_with_index do |tweet, i| xml.item do - xml.title "#{tweet.favorites_count}/#{tweet.retweets_count}: #{strip_tags(format_tweet_text(tweet.text))}" + xml.title "#{tweet.favorites_count}/#{tweet.retweets_count}: #{CGI.unescapeHTML(strip_tags(format_tweet_text(tweet.text)))}" xml.description "Has been favorited by #{tweet.favorites_count} people, retweeted by #{tweet.retweets_count} people" xml.pubDate tweet.tweeted_at.rfc2822 xml.link tweet_url(tweet.id) |