mirror of https://github.com/gorhill/uBlock.git
Fix patching `{{args}}` when instances of `$` are present
Related feedback: - https://github.com/uBlockOrigin/uAssets/issues/16715#issuecomment-1484232457
This commit is contained in:
parent
c3a2c0fb9f
commit
75abf77e62
|
@ -213,7 +213,10 @@ const patchScriptlet = function(content, args) {
|
|||
for ( let i = 0; i < arglist.length; i++ ) {
|
||||
content = content.replace(`{{${i+1}}}`, arglist[i]);
|
||||
}
|
||||
return content.replace('{{args}}', arglist.map(a => `'${a}'`).join(', '));
|
||||
return content.replace(
|
||||
'{{args}}',
|
||||
arglist.map(a => `'${a}'`).join(', ').replace(/\$/g, '$$$')
|
||||
);
|
||||
};
|
||||
|
||||
const logOne = function(tabId, url, filter) {
|
||||
|
|
Loading…
Reference in New Issue