mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
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
1 changed files with 4 additions and 1 deletions
|
|
@ -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 a new issue