fix: Fix CSS rules captured in Safari#86
Conversation
Safari does not escape `:` in attribute selectors correctly, so we need to do that instead.
billyvg
left a comment
There was a problem hiding this comment.
I know there's a unit test, but can we verify this doesn't break for Chrome? I can test it when I'm back next week if you're busy with other stuff.
|
OK, so I tried this, and a problem is that |
|
Ah right, it might be that we need as well |
|
Is it possible this can fix the issue? If not I wonder if there's an alternative work around then so we can unblock folks |
| return sheet.cssRules | ||
| ? Array.from(sheet.cssRules) | ||
| .map((rule) => rule.cssText || '') | ||
| .map((rule) => rule.cssText ? validateStringifiedCssRule(rule.cssText) : '') |
There was a problem hiding this comment.
This should work now for inline css
There was a problem hiding this comment.
nice, could you verify this with an actual example app?
There was a problem hiding this comment.
nice, feel free to merge then!
|
Thanks guys! |
- fix: Fix some input masking (esp for radio buttons) (getsentry/rrweb#85) - fix: Unescaped `:` in CSS rule from Safari (getsentry/rrweb#86) - feat: Define custom elements (web components) (getsentry/rrweb#87)
Safari does not escape
:in attribute selectors correctly, so we need to do that instead.See rrweb-io#1208
ref getsentry/sentry-javascript#7703