You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2a65a95
Browse filesBrowse the repository at this point in the historyBrowse files
fix(html): drop the inline-script trim, keep the decoded type
Trimming an embedded body's edges changes the text of a `<script>` node, so
`syntax-equivalence` reports every wpt page holding one as a DOM the printer
did not preserve. A JavaScript minifier removes those edges anyway, so the
trim bought nothing it was worth filing 488 differences for.
What is left is the bug: a `<script type>` spelled with a character
reference is now read the way the parser reads it, so `text/javascript`
runs and `application/ld+json` is stripped, instead of both shipping
verbatim as data blocks.
* What the HTML minimizer does. Every transform that keeps the document's DOM is on by default and may be turned off on its own, so a page a rewrite breaks can be minimized without it while the rest still applies; the ones that change what a script or a selector reads back are off until asked for. A body the document embeds in a language this can name is minified with it: a JSON `<script>` loses the whitespace between its tokens — every literal copied byte for byte, so no number is rounded and no escape rewritten — and an inline `<script>` holding JavaScript or JSON loses the whitespace at its edges, which is the host's rather than part of what the element holds. A data block's body is left whole, its own whitespace being part of its syntax. A caller's own renderer is asked before any of this, so what it answers for is its to decide.
2518
+
* What the HTML minimizer does. Every transform that keeps the document's DOM is on by default and may be turned off on its own, so a page a rewrite breaks can be minimized without it while the rest still applies; the ones that change what a script or a selector reads back are off until asked for.
Copy file name to clipboardExpand all lines: schemas/WebpackOptions.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3853,7 +3853,7 @@
3853
3853
"added": "5.110.0"
3854
3854
},
3855
3855
"OptimizationMinimizeHtml": {
3856
-
"description": "What the HTML minimizer does. Every transform that keeps the document's DOM is on by default and may be turned off on its own, so a page a rewrite breaks can be minimized without it while the rest still applies; the ones that change what a script or a selector reads back are off until asked for. A body the document embeds in a language this can name is minified with it: a JSON `<script>` loses the whitespace between its tokens — every literal copied byte for byte, so no number is rounded and no escape rewritten — and an inline `<script>` holding JavaScript or JSON loses the whitespace at its edges, which is the host's rather than part of what the element holds. A data block's body is left whole, its own whitespace being part of its syntax. A caller's own renderer is asked before any of this, so what it answers for is its to decide.",
3856
+
"description": "What the HTML minimizer does. Every transform that keeps the document's DOM is on by default and may be turned off on its own, so a page a rewrite breaks can be minimized without it while the rest still applies; the ones that change what a script or a selector reads back are off until asked for.",
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+
exports[`ConfigCacheTestCases html minimize-inline-script-entity-type minimize-inline-script-entity-type should compile 1`] =`
4
+
"<!doctype html><htmllang=en><head><title>Inlinescripttype</title><scripttype=application/ld+json>{\\"a\\":1}</script><scripttype=application/ld+json>{\\"b\\":2}</script></head><body><script>vara=1;</script><scripttype=text/javascript>varb=2;</script><scripttype=text/x-template><pclass=\\"a\\">{{ t }}</p></script><scripttype=text/yaml>
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+
exports[`ConfigTestCases html minimize-inline-script-entity-type minimize-inline-script-entity-type should compile 1`] =`
4
+
"<!doctype html><htmllang=en><head><title>Inlinescripttype</title><scripttype=application/ld+json>{\\"a\\":1}</script><scripttype=application/ld+json>{\\"b\\":2}</script></head><body><script>vara=1;</script><scripttype=text/javascript>varb=2;</script><scripttype=text/x-template><pclass=\\"a\\">{{ t }}</p></script><scripttype=text/yaml>
0 commit comments