replace all occurences of double-escaped entities in FeedTree instead of only first one

This commit is contained in:
Andrew Dolgov 2011-01-24 10:05:15 +03:00
parent 172c86bae1
commit 906fc5b7a1
1 changed files with 5 additions and 5 deletions

View File

@ -151,11 +151,11 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
var name = String(item.name); var name = String(item.name);
/* Horrible */ /* Horrible */
name = name.replace(""", "\""); name = name.replace(/"/g, "\"");
name = name.replace("&", "&"); name = name.replace(/&/g, "&");
name = name.replace("—", "-"); name = name.replace(/—/g, "-");
name = name.replace("&lt;", "<"); name = name.replace(/&lt;/g, "<");
name = name.replace("&gt;", ">"); name = name.replace(/&gt;/g, ">");
if (item.unread > 0) { if (item.unread > 0) {
return name + " (" + item.unread + ")"; return name + " (" + item.unread + ")";