Skip to content

Commit

Permalink
tagName could have : such <kilo:svg> this is used in some xml doc…
Browse files Browse the repository at this point in the history
…uments
  • Loading branch information
titoBouzout committed Oct 2, 2024
1 parent d3b212b commit 3a199e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function isInvalidMarkup(html) {
.replace(/>[^<]+</gi, ">#text<")

// remove attributes (the lack of quotes will make it mismatch)
.replace(/<([a-z0-9-]+)\s+[^>]+>/gi, "<$1>")
.replace(/<([a-z0-9-:]+)\s+[^>]+>/gi, "<$1>")

// fix escaping, so doesnt mess up the validation
// `&lt;script>a();&lt;/script>` -> `&lt;script&gt;a();&lt;/script&gt;`
Expand Down

0 comments on commit 3a199e2

Please sign in to comment.