[BUG] Quotes in group name completly breaks the options page
Describe the bug When using quotes in header name, options page JS crashes
Rule and Test address
- Create a group named
"With Quotes" - Reload the options page
- Page displays no rule, while they still are active, becausse console says
SyntaxError: '#groups .group-item[data-name=""With Quotes""]' is not a valid selector
Solution: I suspect that the JS code is made using concatenation like document.querySelector('#groups .group-item[data-name="' + headerName + '"]) so either escape the selector content (I don't know how to), or use a proper filter:
Array.from(document.querySelectorAll('#groups .group-item')).filter(n => n.dataset['name'] = headerName)...
Extra informations None. -This is blocking because the whole option page is empty (= groups are there, but empty, no rule in it, since JS crashed) so if you have a way to remove the breaking group, it will help me-
[Edit] i've mixed "group" and "rule": quotes in "group" name breaks the page
[Edit2] I've managed to remove the breaking group by changing the data-name value of another group (one that's properly shown) to "With Quotes" and click the "delete" button, so I'm no longer blocked, but the bug still exists
Please upgrade to 4.x
Alright, seems to fix the bug, but I'll stick to v3 anyway because v4 is really utterly slow (typing a letter has like a 300-500ms latency) Thanks tho
Where do you type?
Anywhere: when editing a rule, and putting it in a new group, when setting a rule name/header name/header value. This slowness is not existent on the v3 version. It might come from stuff overlayed on the browser by the company tho, I'll check it again once at home (it cannot be a computer's general slowness as it's a recent i7 3Ghz+ and such).