mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-23 22:16:48 +00:00
fix(webi): all $s should be escaped with $$$$
This commit is contained in:
+5
-1
@@ -143,7 +143,11 @@ Releases.renderBash = function (
|
||||
/^\s*#?PKG_FORMATS=.*/m,
|
||||
"PKG_FORMATS='" + ((rel && rel.formats) || []).join(',') + "'"
|
||||
)
|
||||
.replace(reInstallTpl, '\n' + installTxt)
|
||||
// $', $0, ... $9, $`, $&, and $_ all have special meaning
|
||||
// (see https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)
|
||||
// However, it can be escaped with $$ (which must be escaped with $$)
|
||||
|
||||
.replace(reInstallTpl, '\n' + installTxt.replace(/\$/g, '$$$$'))
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user