diff --git a/common/content/modes.js b/common/content/modes.js index 3f1b997b..c54dded9 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -238,7 +238,7 @@ var Modes = Module("modes", { return <>; } - return rec(roots).toXMLString(); + return rec(roots); } util.timeout(function () { diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 33568d76..cc1d245c 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -215,8 +215,8 @@ var ConfigBase = Class("ConfigBase", { "xmlns.html": "http://www.w3.org/1999/xhtml", "xmlns.xul": "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - "tag.command-line": 'command line', - "tag.status-line": 'status line', + "tag.command-line": command line, + "tag.status-line": status line, }, dtdStrings: [ diff --git a/common/modules/options.jsm b/common/modules/options.jsm index aaa6aba1..9dfecffa 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -756,14 +756,12 @@ var Options = Module("options", { opt.set(opt.globalValue, Option.SCOPE_GLOBAL, true); }, window); - function escape(str) str.replace(/[<&]/g, function (m) ({ "&": "&", "<": "<" })[m]); - services["dactyl:"].pages["options.dtd"] = function () [null, util.makeDTD( iter(([["option", o.name, "default"].join("."), - escape(o.type === "string" ? o.defaultValue.replace(/'/g, "''") : - o.value === true ? "on" : - o.value === false ? "off" : o.stringDefaultValue)] + o.type === "string" ? o.defaultValue.replace(/'/g, "''") : + o.value === true ? "on" : + o.value === false ? "off" : o.stringDefaultValue] for (o in self)), ([["option", o.name, "type"].join("."), o.type] for (o in self)), diff --git a/common/modules/util.jsm b/common/modules/util.jsm index e9a6ec46..d8c973dd 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -1080,9 +1080,11 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), * @returns {string} The DTD fragment containing entity declaration * for *obj*. */ - makeDTD: function makeDTD(obj) iter(obj) - .map(function ([k, v]) ["": ">" }) + function makeDTD(obj) iter(obj) + .map(function ([k, v]) ["]/g, + function (m) map[m]), "'>"].join("")) .join("\n"),