mirror of https://github.com/gorhill/uBlock.git
Fix unescaped attr value in generated CSS selector
Related feedback: - https://github.com/NanoAdblocker/NanoCore2/commit/5e625da8fe45#commitcomment-36625096
This commit is contained in:
parent
b7285973c5
commit
e9abce61a0
|
@ -952,7 +952,7 @@ vAPI.domCollapser = (function() {
|
||||||
if ( netSelectorCacheCount <= netSelectorCacheCountMax ) {
|
if ( netSelectorCacheCount <= netSelectorCacheCountMax ) {
|
||||||
const value = target.getAttribute(prop);
|
const value = target.getAttribute(prop);
|
||||||
if ( value ) {
|
if ( value ) {
|
||||||
selectors.push(tag + '[' + prop + '="' + value + '"]');
|
selectors.push(`${tag}[${prop}="${CSS.escape(value)}"]`);
|
||||||
netSelectorCacheCount += 1;
|
netSelectorCacheCount += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue