Fix unescaped attr value in generated CSS selector

Related feedback:
- https://github.com/NanoAdblocker/NanoCore2/commit/5e625da8fe45#commitcomment-36625096
This commit is contained in:
Raymond Hill 2019-12-31 16:14:50 -05:00
parent b7285973c5
commit e9abce61a0
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -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;
} }
} }