Bug 562845 Port bug 546013 bug 922530 bug 909264 r=Ratty SEA_2_26_1_RELBRANCH
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 21 Feb 2014 01:04:01 +0000
branchSEA_2_26_1_RELBRANCH
changeset 31056 f226cb234deb230217bce7a9d907cda0976ad9af
parent 31055 b8059a5e7a4b908d530835b451cb96b8159f6488
child 31057 27995f4797f516eff98a6702919b095e645a4990
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [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
@@ -1962,23 +1962,23 @@ function losslessDecodeURI(aURI) {
                 // ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '#'
                 // (RFC 3987 section 3.2)
                 .replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)/ig,
                          encodeURIComponent);
     } catch (e) {}
 
   // 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>
  **/
 /**