diff options
author | anekos | 2010-07-07 01:33:29 +0000 |
---|---|---|
committer | anekos | 2010-07-07 01:33:29 +0000 |
commit | d63e6a8a6b4b6e22b9aa6997a0178dd18efed28f (patch) | |
tree | 5745c8702ce09ca8dd0267b259d5587c2efeb185 | |
parent | c47b5c48e766ef8c1a608ea0a2f3e66b71cd83e1 (diff) | |
download | vimperator-plugins-d63e6a8a6b4b6e22b9aa6997a0178dd18efed28f.tar.bz2 |
<>とかが化けるので戻す
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37908 d0d07461-0603-4401-acd4-de1884942a52
-rwxr-xr-x | twittperator.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/twittperator.js b/twittperator.js index c425e1a..10d00c1 100755 --- a/twittperator.js +++ b/twittperator.js @@ -1057,6 +1057,9 @@ let statusValidDuration = parseInt(liberator.globalVariables.twitperator_status_ let statusRefreshTimer; function showTL (s) { + function unescapeHTML (str) + str.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"); + let html = <style type="text/css"><![CDATA[ span.twitter.entry-content a { text-decoration: none; } span.twitter.entry-content.rt:before { content: "RT "; color: silver; } @@ -1071,13 +1074,13 @@ function showTL (s) { <img src={rt.user.profile_image_url} alt={rt.user.screen_name} class="twitter photo"/> <strong>{rt.user.screen_name}‬</strong> <img src={status.user.profile_image_url} alt={status.user.screen_name} class="twitter photo"/> - : <span class="twitter entry-content rt">{detectLink(rt.text)}</span> + : <span class="twitter entry-content rt">{detectLink(unescapeHTML(rt.text))}</span> </> } else { xml = <> <img src={status.user.profile_image_url} alt={status.user.screen_name} class="twitter photo"/> <strong title={status.user.name}>{status.user.screen_name}‬</strong> - : <span class="twitter entry-content">{detectLink(status.text)}</span> + : <span class="twitter entry-content">{detectLink(unescapeHTML(status.text))}</span> </>; } return xml.toSource().replace(/(?:\r\n|[\r\n])[ \t]*/g, " "); |