mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-16 07:55:45 +01:00
Fix dtd generation bug.
This commit is contained in:
@@ -749,12 +749,14 @@ 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("."),
|
||||
o.type === "string" ? o.defaultValue.replace(/'/g, "''") :
|
||||
o.value === true ? "on" :
|
||||
o.value === false ? "off" : o.stringDefaultValue]
|
||||
escape(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)),
|
||||
|
||||
Reference in New Issue
Block a user