mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-18 05:15:46 +01:00
Update curl plugin.
This commit is contained in:
@@ -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