]> git.wh0rd.org Git - tt-rss.git/commitdiff
add a hack to display several html entities properly in feedlist (closes #279)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 28 Dec 2010 13:10:10 +0000 (16:10 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 28 Dec 2010 13:10:10 +0000 (16:10 +0300)
FeedTree.js

index f7d273f0be70bbf7d4eeb95649cd9117e96d6a7a..26629e8cefeb83b79060e8629153b8537a685cc8 100644 (file)
@@ -148,10 +148,19 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
                        "dijitTreeRow Error";
        },
        getLabel: function(item) {
+               var name = String(item.name);
+
+               /* Horrible */
+               name = name.replace("&quot;", "\"");
+               name = name.replace("&amp;", "&");
+               name = name.replace("&mdash;", "-");
+               name = name.replace("&lt;", "<");
+               name = name.replace("&gt;", ">");
+
                if (item.unread > 0) {
-                       return item.name + " (" + item.unread + ")";
+                       return name + " (" + item.unread + ")";
                } else {
-                       return item.name;
+                       return name;
                }
        },
        selectFeed: function(feed, is_cat) {