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

html base element - forbid href with data or javascript url #20646

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Sep 4, 2023

The href in the <base> element disallows data: and javascript: URLs in a recent spec change. Note however that Chrome and Safari already obey this rule. FF does not - but will in https://bugzilla.mozilla.org/show_bug.cgi?id=1850967

This was tested using first test in http://wpt.live/html/semantics/document-metadata/the-base-element/base-javascript.html and http://wpt.live/html/semantics/document-metadata/the-base-element/base-data.html

Note that the dynamic case of using JavaScript to add a new base element is not yet supported by our browsers - this is the third test in the above tests (currently failing). This PR only applies to the HTML base element.

Associated docs: mdn/content#28865

@github-actions github-actions bot added the data:html 📄 Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML label Sep 4, 2023
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@wbamberg wbamberg merged commit 14cd74f into mdn:main Sep 4, 2023
3 checks passed
Elchi3 pushed a commit to Elchi3/browser-compat-data that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:html 📄 Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants