annotate config/initializers/ext_twitter_tweet.rb @ 172:df4be896ab8b

Improved escaping and truncating
author nanaya <me@nanaya.pro>
date Wed, 08 Aug 2018 20:37:29 +0900
parents
children d35dbc09bd83
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
172
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
1 class Twitter::Tweet
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
2 def unescaped_text
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
3 CGI.unescapeHTML attrs[:full_text].printable
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
4 end
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
5
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
6 memoize :unescaped_text
df4be896ab8b Improved escaping and truncating
nanaya <me@nanaya.pro>
parents:
diff changeset
7 end