Bug 562845 Port bug 546013 bug 922530 bug 909264 r=Ratty
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 21 Feb 2014 01:04:01 +0000
changeset 15775 01a9de9baf7a55d26935b0ac847518c2c2fda3f1
parent 15774 ed8c317c7a96e15b4e3cd1e6d6e4748efe26606a
child 15776 e2b29f224ade93d5cff8f10e86bb36621fe71bd4
push id9882
push userneil@parkwaycc.co.uk
push dateFri, 21 Feb 2014 01:04:19 +0000
treeherdercomm-central@01a9de9baf7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRatty
bugs562845, 546013, 922530, 909264
Bug 562845 Port bug 546013 bug 922530 bug 909264 r=Ratty a=Callek for checkin to a CLOSED TREE
suite/browser/navigator.js
--- a/suite/browser/navigator.js
+++ b/suite/browser/navigator.js
@@ -1980,23 +1980,23 @@ function losslessDecodeURI(aURI) {
     // (RFC 3987 section 3.2)
     if (unescaped != value)
       value = unescaped.replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)/ig,
                                 encodeURIComponent);
   }
 
   // Encode invisible characters (soft hyphen, zero-width space, BOM,
   // line and paragraph separator, word joiner, invisible times,
-  // invisible separator, object replacement character) (bug 452979)
+  // invisible separator, object replacement character,
+  // C0/C1 controls). (bug 452979, bug 909264)
   // Encode bidirectional formatting characters.
   // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
   // Re-encode whitespace so that it doesn't get eaten away
   // by the location bar (bug 410726).
-  return value.replace(/[\x09-\x0d\x1c-\x1f\u00ad\u200b\u200e\u200f\u2028-\u202e\u2060\u2062\u2063\ufeff\ufffc]/g,
-                        encodeURIComponent);
+  return value.replace(/[\u0000-\u001f\u007f-\u00a0\u00ad\u034f\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180d\u200b\u200e\u200f\u2028-\u202e\u2060-\u206f\u3164\udb40-\udb43\udc00-\udfff\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8\ufffc]|i\ud834[\udd73-\udd7a]/g, encodeURIComponent);
 }
 
 /**
  * Use Stylesheet functions.
  *     Written by Tim Hill (bug 6782)
  *     Frameset handling by Neil Rashbrook <neil@parkwaycc.co.uk>
  **/
 /**