Skip to content

Commit

Permalink
Fix unescaped attr value in generated CSS selector
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Dec 31, 2019
1 parent b728597 commit e9abce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ vAPI.domCollapser = (function() {
if ( netSelectorCacheCount <= netSelectorCacheCountMax ) {
const value = target.getAttribute(prop);
if ( value ) {
selectors.push(tag + '[' + prop + '="' + value + '"]');
selectors.push(`${tag}[${prop}="${CSS.escape(value)}"]`);
netSelectorCacheCount += 1;
}
}
Expand Down

0 comments on commit e9abce6

Please sign in to comment.