1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 20:27:58 +01:00

Hackier but more reliable literal() stuff.

This commit is contained in:
Kris Maglione
2014-06-18 12:24:55 -07:00
parent fdf188166d
commit cde8cd6763
15 changed files with 66 additions and 63 deletions

View File

@@ -190,7 +190,7 @@ function XMLChannel(uri, contentType, noErrorChannel, unprivileged) {
let type = this.channel.contentType;
if (/^text\/|[\/+]xml$/.test(type)) {
let stream = services.InputStream(channelStream);
let [, pre, doctype, url, extra, open, post] = util.regexp(literal(/*
let [, pre, doctype, url, extra, open, post] = util.regexp(literal(function () /*
^ ([^]*?)
(?:
(<!DOCTYPE \s+ \S+ \s+) (?:SYSTEM \s+ "([^"]*)" | ((?:[^[>\s]|\s[^[])*))
@@ -198,7 +198,7 @@ function XMLChannel(uri, contentType, noErrorChannel, unprivileged) {
([^]*)
)?
$
*/), "x").exec(stream.read(4096));
*/$), "x").exec(stream.read(4096));
this.writes.push(pre);
if (doctype) {
this.writes.push(doctype + (extra || "") + " [\n");