bug 587608 - Feed reader broken by regexp failure - workaround, review pending, a=KaiRo for alpha functionality fix and ignoring CLOSED TREE on relbranch COMM20b4_20100815_RELBRANCH SEAMONKEY_2_1a3_BUILD2 SEAMONKEY_2_1a3_RELEASE
authorNeil Rashbrook <neil@httl.net>
Tue, 17 Aug 2010 16:55:28 +0200
branchCOMM20b4_20100815_RELBRANCH
changeset 6191 d240279984970b8cb15539b88487ea7e7e4da0e5
parent 6185 eeff67ec62e6bbe4cb70a4181dfeaef63c13f70a
child 6192 db28276c4ca9d50555fd65fcf4b501260dd6195f
push idunknown
push userunknown
push dateunknown
reviewersKaiRo
bugs587608
bug 587608 - Feed reader broken by regexp failure - workaround, review pending, a=KaiRo for alpha functionality fix and ignoring CLOSED TREE on relbranch
mailnews/extensions/newsblog/content/utils.js
--- a/mailnews/extensions/newsblog/content/utils.js
+++ b/mailnews/extensions/newsblog/content/utils.js
@@ -444,20 +444,20 @@ function createURN(name)
 {
   // The builtin encodeURI provides nearly the exact
   // encoding functionality required by the RFC.  The
   // exceptions are that NULL characters should not
   // appear, and that #, /, ?, &, and ~ should be
   // escaped.
   // NULL characters are removed before encoding.
 
-  name = name.replace("\0", "", "g");
+  name = name.replace(/\0/g, "");
 
   var encoded = encodeURI(name);
 
-  encoded = encoded.replace("#", "%23", "g");
-  encoded = encoded.replace("/", "%2f", "g");
-  encoded = encoded.replace("?", "%3f", "g");
-  encoded = encoded.replace("&", "%26", "g");
-  encoded = encoded.replace("~", "%7e", "g");
+  encoded = encoded.replace(/\#/g, "%23");
+  encoded = encoded.replace(/\//g, "%2f");
+  encoded = encoded.replace(/\?/g, "%3f");
+  encoded = encoded.replace(/\&/g, "%26");
+  encoded = encoded.replace(/\~/g, "%7e");
 
   return FZ_ITEM_NS + encoded;
 }