Skip to content

Added uri check for serialized iframes#2128

Merged
aryanku-dev merged 9 commits intomasterfrom
PER-7051-issue-2120
Mar 11, 2026
Merged

Added uri check for serialized iframes#2128
aryanku-dev merged 9 commits intomasterfrom
PER-7051-issue-2120

Conversation

@aryanku-dev
Copy link
Copy Markdown
Contributor

This pull request improves the robustness of the iframe serialization logic by handling cases where an iframe's baseURI is not a valid URL. It ensures that the code does not crash when encountering such cases and adds a test to verify this behavior.

Error Handling Improvements:

  • Updated setBaseURI in serialize-frames.js to safely handle unparseable baseURI values by wrapping the URL constructor in a try/catch block and exiting early if parsing fails.

Testing Enhancements:

  • Added a test in serialize-frames.test.js to ensure that serialization does not throw errors when an iframe has an invalid baseURI, and that no <base> tag is injected in this scenario.

@aryanku-dev aryanku-dev requested a review from a team as a code owner March 1, 2026 18:44
@aryanku-dev aryanku-dev merged commit cb9bfc4 into master Mar 11, 2026
41 checks passed
@aryanku-dev aryanku-dev deleted the PER-7051-issue-2120 branch March 11, 2026 07:26
@rishigupta1599 rishigupta1599 changed the title added uri check Added uri check for serialized iframes Mar 16, 2026
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.

2 participants