mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02: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
@ -213,7 +213,10 @@ const patchScriptlet = function(content, args) {
|
|||||||
for ( let i = 0; i < arglist.length; i++ ) {
|
for ( let i = 0; i < arglist.length; i++ ) {
|
||||||
content = content.replace(`{{${i+1}}}`, arglist[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) {
|
const logOne = function(tabId, url, filter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user