Bug: Replaces new lines with "A" character and makes CSS selector invalid
In utilities.js line 39, .replace(/\n/g, '\A') replaces new line characters with A character. Replacement part should be \\A. This bug causes CSS selectors to be invalid. For example, if an element has many classes separated by new lines, this adds .A selector for each new line. For instance, if class attribute of an element is class1\n class2\n class3, produced CSS selector is .class1A.class2A.class3, where it should be .class1.class2.class3
Thanks for bringing up the issue. It will be tackled along with some other improvements in an upcoming release!
@turgutsaricam hey, just encountered this also. But, changing this to \A didn't work for me - I am getting the selector of the element using this lib, but after then, trying to find it with document.querySelector(). And when adding \A, it is not workig properly.
Should the fix be replace \n with nothing?