Skip to content

The canonical form strips active markup in any namespace, and reads URL schemes as the browser does - #36

Open
namedgraph wants to merge 1 commit into
masterfrom
fix/sanitize-any-namespace
Open

namedgraph wants to merge 1 commit into
masterfrom
fix/sanitize-any-namespace

Conversation

@namedgraph

Copy link
Copy Markdown
Member

S1 matched script and its kin in the XHTML namespace only, so an svg:script
survived; one in no namespace becomes an HTML script once the content is
served as HTML. It now matches by local name in any namespace, and takes out
frames and SVG's set/animate* too, which can set a link's target.

S3 read the scheme after normalize-space(), which turns a tab into a space:
"java script:" became "java script:" and passed, while the browser removes
the tab and runs it. It matched @href in no namespace only, so an SVG link's
xlink:href passed as well. It now reads the scheme the way the browser does
(cm:url-scheme: tabs and line breaks removed, leading spaces trimmed) on
href, src, action, formaction, poster and background in any namespace.

S2 also strips srcdoc, a frame's inline document.

Found by LinkedDataHub's formal model of its XSLT layer (formal/xslt).

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

…RL schemes as the browser does

S1 matched script and its kin in the XHTML namespace only, so an svg:script
survived; one in no namespace becomes an HTML script once the content is
served as HTML. It now matches by local name in any namespace, and takes out
frames and SVG's set/animate* too, which can set a link's target.

S3 read the scheme after normalize-space(), which turns a tab into a space:
"java	script:" became "java script:" and passed, while the browser removes
the tab and runs it. It matched @href in no namespace only, so an SVG link's
xlink:href passed as well. It now reads the scheme the way the browser does
(cm:url-scheme: tabs and line breaks removed, leading spaces trimmed) on
href, src, action, formaction, poster and background in any namespace.

S2 also strips srcdoc, a frame's inline document.

Found by LinkedDataHub's formal model of its XSLT layer (formal/xslt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant