1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-15 04:15:46 +01:00

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-11-28 20:24:44 -08:00
parent 23b6c07666
commit 276956284e
19 changed files with 129 additions and 88 deletions

View File

@@ -341,14 +341,14 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
let defaults = { lt: "<", gt: ">" };
let re = util.regexp(<![CDATA[
let re = util.regexp(literal(/*
([^]*?) // 1
(?:
(<\{) | // 2
(< ((?:[a-z]-)?[a-z-]+?) (?:\[([0-9]+)\])? >) | // 3 4 5
(\}>) // 6
)
]]>, "gixy");
*/), "gixy");
macro = String(macro);
let end = 0;
for (let match in re.iterate(macro)) {
@@ -864,7 +864,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
},
// ripped from Firefox; modified
unsafeURI: Class.Memoize(function () util.regexp(String.replace(<![CDATA[
unsafeURI: Class.Memoize(function () util.regexp(String.replace(literal(/*
[
\s
// Invisible characters (bug 452979)
@@ -878,7 +878,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
// Bidi formatting characters. (RFC 3987 sections 3.2 and 4.1 paragraph 6)
U200E U200F U202A U202B U202C U202D U202E
]
]]>, /U/g, "\\u"),
*/), /U/g, "\\u"),
"gx")),
losslessDecodeURI: function losslessDecodeURI(url) {
return url.split("%25").map(function (url) {