Skip to content

Conversation

@yannickadam
Copy link
Contributor

Motivation

Safari does not escape colons in CSS selector Text ( such as [ng:cloak] ).
This causes issues during session replay, as the styles are not applied.
https://bugs.webkit.org/show_bug.cgi?id=184604
rrweb-io/rrweb#1253

Changes

When a CSS rule selector contains a colon, ensure it is escaped.

Testing

Record a page containing selectors with a colon using Safari. Check that the display is as expected in Session Replay.

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@yannickadam yannickadam requested a review from a team as a code owner September 25, 2023 22:17
@yannickadam yannickadam requested a review from a team September 25, 2023 22:17
@codecov-commenter
Copy link

Codecov Report

Merging #2440 (257e6ee) into main (4f05f4b) will increase coverage by 0.00%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2440   +/-   ##
=======================================
  Coverage   93.33%   93.33%           
=======================================
  Files         226      226           
  Lines        6644     6648    +4     
  Branches     1479     1480    +1     
=======================================
+ Hits         6201     6205    +4     
  Misses        443      443           
Files Coverage Δ
...domain/record/serialization/serializeAttributes.ts 98.66% <100.00%> (+0.07%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yannickadam yannickadam changed the title 🐛 [RUM-1193] Escape CSS rules containing a colon for Safari compatibility 🐛 [RUM-1196] Escape CSS rules containing a colon for Safari compatibility Sep 26, 2023
@yannickadam yannickadam merged commit de5e298 into main Oct 5, 2023
@yannickadam yannickadam deleted the RUM-1193-Session_replay_escaping_issue branch October 5, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants