From: Andrew Dolgov Date: Tue, 28 Dec 2010 13:10:10 +0000 (+0300) Subject: add a hack to display several html entities properly in feedlist (closes #279) X-Git-Tag: 1.5.1~16 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cb2c7faab057394a9ce8db6ea15e1bce9980bf4f;p=tt-rss.git add a hack to display several html entities properly in feedlist (closes #279) --- diff --git a/FeedTree.js b/FeedTree.js index f7d273f0..26629e8c 100644 --- a/FeedTree.js +++ b/FeedTree.js @@ -148,10 +148,19 @@ dojo.declare("fox.FeedTree", dijit.Tree, { "dijitTreeRow Error"; }, getLabel: function(item) { + var name = String(item.name); + + /* Horrible */ + name = name.replace(""", "\""); + name = name.replace("&", "&"); + name = name.replace("—", "-"); + name = name.replace("<", "<"); + name = name.replace(">", ">"); + if (item.unread > 0) { - return item.name + " (" + item.unread + ")"; + return name + " (" + item.unread + ")"; } else { - return item.name; + return name; } }, selectFeed: function(feed, is_cat) {