mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-29 06:42:26 +01:00
Update curl plugin.
This commit is contained in:
@@ -548,7 +548,7 @@ var DOM = Class("DOM", {
|
||||
let charset = doc.characterSet;
|
||||
let converter = services.CharsetConv(charset);
|
||||
for (let cs of form.acceptCharset.split(/\s*,\s*|\s+/)) {
|
||||
let c = services.CharsetConv(cs);
|
||||
let c = cs && services.CharsetConv(cs);
|
||||
if (c) {
|
||||
converter = services.CharsetConv(cs);
|
||||
charset = cs;
|
||||
|
||||
@@ -175,7 +175,7 @@ var Services = Module("Services", {
|
||||
* @param {string} init Name of a property or method used to initialize the
|
||||
* class.
|
||||
*/
|
||||
addClass: function addClass(name, class_, ifaces, init = null, quiet = false) {
|
||||
addClass: function addClass(name, class_, ifaces, init = null, quiet = true) {
|
||||
this.services[name] = { class: class_,
|
||||
interfaces: Array.concat(ifaces || []),
|
||||
method: "createInstance",
|
||||
|
||||
@@ -1543,6 +1543,10 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
* separators.
|
||||
*/
|
||||
shellEscape: function shellEscape(str) {
|
||||
// Pass through simple strings without escaping.
|
||||
if (/^[-+\w/.,/:]+$/.test(str))
|
||||
return str;
|
||||
|
||||
return '"' + String.replace(str, /[\\"$`]/g, "\\$&") + '"';
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user