diff config/initializers/ext_twitter_tweet.rb @ 174:d35dbc09bd83

Less double escaping for actual content Ends up rather confusing.
author nanaya <me@nanaya.pro>
date Thu, 09 Aug 2018 19:31:22 +0900
parents df4be896ab8b
children
line wrap: on
line diff
--- a/config/initializers/ext_twitter_tweet.rb	Wed Aug 08 20:38:29 2018 +0900
+++ b/config/initializers/ext_twitter_tweet.rb	Thu Aug 09 19:31:22 2018 +0900
@@ -1,7 +1,11 @@
 class Twitter::Tweet
+  def full_text_extended
+    attrs[:full_text].printable
+  end
+  memoize :full_text_extended
+
   def unescaped_text
-    CGI.unescapeHTML attrs[:full_text].printable
+    CGI.unescapeHTML full_text_extended
   end
-
   memoize :unescaped_text
 end