mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
code review re #2132
This commit is contained in:
parent
6f512f39fb
commit
54e8761ce6
@ -1424,9 +1424,11 @@ FilterContainer.prototype._lookupUserScript = function(dict, raw, reng, out) {
|
||||
pos = args.indexOf(',');
|
||||
if ( pos === -1 ) { pos = args.length; }
|
||||
arg = args.slice(0, pos).trim();
|
||||
if ( reArgValidator.test(arg) ) {
|
||||
content = content.replace('{{' + i + '}}', arg);
|
||||
// Abort on invalid arguments.
|
||||
if ( reArgValidator.test(arg) === false ) {
|
||||
return;
|
||||
}
|
||||
content = content.replace('{{' + i + '}}', arg);
|
||||
args = args.slice(pos + 1).trim();
|
||||
i++;
|
||||
}
|
||||
@ -1436,7 +1438,7 @@ FilterContainer.prototype._lookupUserScript = function(dict, raw, reng, out) {
|
||||
};
|
||||
|
||||
// Only accept plain word characters for now.
|
||||
var reArgValidator = /^\w*$/;
|
||||
var reArgValidator = /^[\w\.]*$/;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user