mirror of https://github.com/gorhill/uBlock.git
remove stray comma separator in injected CSS declarations
This commit is contained in:
parent
3752ac4880
commit
87d0cce9b2
|
@ -209,7 +209,7 @@ vAPI.domFilterer = {
|
|||
if ( this.newCSSRules.length ) {
|
||||
styleTag = document.createElement('style');
|
||||
styleTag.setAttribute('type', 'text/css');
|
||||
styleTag.textContent = ':root ' + this.newCSSRules.join(',\n:root ');
|
||||
styleTag.textContent = ':root ' + this.newCSSRules.join('\n:root ');
|
||||
document.head.appendChild(styleTag);
|
||||
this.styleTags.push(styleTag);
|
||||
this.newCSSRules.length = 0;
|
||||
|
|
|
@ -388,6 +388,10 @@ FilterParser.prototype.translateAdguardCSSInjectionFilter = function(raw) {
|
|||
if ( matches === null ) {
|
||||
return '';
|
||||
}
|
||||
// For now we do not allow generic CSS injections (prolly never).
|
||||
if ( matches[1] === '' && matches[2] !== '@' ) {
|
||||
return '';
|
||||
}
|
||||
return matches[1] +
|
||||
'#' + matches[2] + '#' +
|
||||
matches[3].trim() +
|
||||
|
|
Loading…
Reference in New Issue