Closed olejorgenb closed 3 years ago
Hi @olejorgenb, thanks for flagging this. Can you provide a website where we can reproduce the issue?
No, the site is not public, but I would guess it's easy enough to reproduce using a class name containing an escaped (
: I don't have the extension handy but maybe this will do the trick: https://jsfiddle.net/Laqbnx58/1/
There's no escaping of the \
s in the selector here: https://github.com/checkly/headless-recorder/blob/765cb4fe5327384990005d85006c869a8e88ffde/src/code-generator/CodeGenerator.js#L137
CSS class names are allowed to contain \
escaped special characters: https://www.w3.org/TR/CSS21/syndata.html#characters
The class names are generated by material UI's JSS. The react-redux Connect HOC add brackets to the component name which JSS use as a basis for making the class name. Of course - using these class names are not really robust, so a proper test wouldn't really rely on these.
Thanks for the information @olejorgenb. I would gladly take a PR for it! Otherwise, I'm going to keep an eye on it and fix it when we have the bandwidth.
Hi, I fixed this issue on my local environment, so could you add me to this repository as a collaborator? If you invite me, I will push and create PR for this issue.
Hi @honey-dip, those are great news. You should be able to fork the project and create the PR. Let me know is you need some help with that. Thanks!
@ianaya89 I appreciate your comment, and I have created new PR. Thanks!
The following was generated by headless-recorder
But since
\
already means escape next char in javascript the\
also need escaping: