Skip to content

Commit e9abce6

Browse files
committed
Fix unescaped attr value in generated CSS selector
Related feedback: - NanoAdblocker/NanoCore2@5e625da8fe45#commitcomment-36625096
1 parent b728597 commit e9abce6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/contentscript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ vAPI.domCollapser = (function() {
952952
if ( netSelectorCacheCount <= netSelectorCacheCountMax ) {
953953
const value = target.getAttribute(prop);
954954
if ( value ) {
955-
selectors.push(tag + '[' + prop + '="' + value + '"]');
955+
selectors.push(`${tag}[${prop}="${CSS.escape(value)}"]`);
956956
netSelectorCacheCount += 1;
957957
}
958958
}

0 commit comments

Comments
 (0)