Merge pull request #1287 from morluto/fix/javascript-html-script-url-decoding

fix(javascript): resolve HTML script URLs after URL whitespace and percent decoding
This commit is contained in:
Kaoru0822
2026-10-09 07:13:13 -07:00
committed by GitHub
5 changed files with 156 additions and 10 deletions
+5 -2
View File
@@ -294,8 +294,11 @@ do not select a later entry. Rejected references retain the package metadata
path, original target, failed constraint, and importing source location.
HTML script references resolve to exact inventoried files after applying the
document base and query/fragment rules. CommonJS module lookups retain extension
and directory resolution.
document base and query/fragment rules. As in a browser, the script URL and base
href are read without surrounding whitespace or embedded tabs and newlines, and
their percent-encoded path bytes are decoded; encoded dot and separator bytes
are still rejected. CommonJS module lookups retain extension and directory
resolution.
Unresolved HTML references retain their declaration, source range, and resolution
reason in the renderer observations.
HTML script source ranges follow the HTML parser across LF, CRLF, and bare CR