Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Path transformation logic for stylesheet URLs produce wrong output #1391

Open
1 task done
navaneethsdk opened this issue Jan 8, 2024 · 0 comments · May be fixed by #1392
Open
1 task done

[Bug]: Path transformation logic for stylesheet URLs produce wrong output #1391

navaneethsdk opened this issue Jan 8, 2024 · 0 comments · May be fixed by #1392
Labels
bug Something isn't working

Comments

@navaneethsdk
Copy link

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.11

Expected Behavior

The path transformation logic should ideally preserve protocol URLs without transforming them.

Actual Behavior

Here is a quick video demonstrating the issue: https://navaneeth-d.neetorecord.com/watch/99b36158-a56b-4bbb-af8a-8c66ecf67b77

Steps to Reproduce

  1. Include a protocol URL like chrome-extension://liecbddmkiiihnedobmlmillhodjkdmb/fonts/CircularXXWeb-Bold.woff2 within the stylesheet of the host. Eg:
@font-face {
  font-weight: 400;
  font-style:  normal;
  font-family: circular;

  src: url('chrome-extension://liecbddmkiiihnedobmlmillhodjkdmb/fonts/CircularXXWeb-Book.woff2') format('woff2');
}
  1. Inspect the recorded session to find the transformed URL as follows: http://localhost:8080/chrome-extension://liecbddmkiiihnedobmlmillhodjkdmb/fonts/CircularXXWeb-Book.woff2

Testcase Gist URL

No response

Additional Information

The PR #1130 already included a fix for this but it doesn't cover all the edge cases (chrome-extension). Altering the regex should fix the issue.

@navaneethsdk navaneethsdk added the bug Something isn't working label Jan 8, 2024
@navaneethsdk navaneethsdk changed the title [Bug]: Path transformation logic in stylesheet URLs [Bug]: Path transformation logic in stylesheet URLs produce wrong output Jan 8, 2024
@navaneethsdk navaneethsdk changed the title [Bug]: Path transformation logic in stylesheet URLs produce wrong output [Bug]: Path transformation logic for stylesheet URLs produce wrong output Jan 8, 2024
@navaneethsdk navaneethsdk linked a pull request Jan 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant