Kaoru0822
90c6922905
fix(javascript): keep empty URL path segments significant ( #3792 )
...
* fix(javascript): keep empty URL path segments significant
ESM imports and HTML script references were joined with POSIX path
rules, which collapse '//' before applying '..'. URL resolution removes
the empty segment instead, so './assets//../app.js' names assets/app.js,
not app.js, and the graph linked the importer and renderer to the wrong
file. URL references refused every '//' even when dot segments cancel it.
Resolve ESM, HTML (including document base) and URL references through
one URL dot-segment helper. A remaining empty segment stays unavailable,
references above the artifact root are still rejected, and CommonJS keeps
filesystem path semantics.
Fixes #3307
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
* fix(javascript): resolve HTML base and reference as one URL path
The base href was turned into a canonical path before the script
reference was applied. A base empty segment that the reference's '..'
would remove was rejected early, and an above-root '..' from the base
became a removable segment that the reference's '..' could cancel.
Keep one URL path state through base and reference resolution, with
above-root escapes held apart from removable segments, and reject empty
segments only in the final path. Remove the superseded htmlBaseDirectory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-14 19:12:49 -07:00
..
2026-10-11 00:28:39 +08:00
2026-10-15 03:13:28 +08:00
2026-10-13 10:21:53 +08:00
2026-10-13 23:51:44 +08:00
2026-10-07 21:09:33 +08:00
2026-10-15 03:43:28 +08:00
2026-10-15 03:43:29 +08:00
2026-10-13 23:48:24 +08:00
2026-10-13 15:55:25 +09:00
2026-10-14 09:16:33 +08:00
2026-10-13 13:23:03 +08:00
2026-10-11 00:03:21 +08:00
2026-10-13 11:39:30 +08:00
2026-10-14 16:10:46 +08:00
2026-10-13 16:08:41 +08:00
2026-10-11 20:09:21 +08:00
2026-10-13 12:46:06 +08:00
2026-10-14 19:12:49 -07:00
2026-10-15 03:43:29 +08:00
2026-10-14 03:01:23 +08:00
2026-10-15 06:33:48 +08:00
2026-10-13 04:53:03 +00:00
2026-10-12 14:12:44 +08:00
2026-10-14 04:47:34 +08:00
2026-10-14 02:50:30 +08:00
2026-10-13 15:58:19 +09:00
2026-10-12 18:33:23 +00:00
2026-10-14 02:39:03 +08:00
2026-10-14 08:32:00 +08:00
2026-10-14 08:32:00 +08:00
2026-10-09 00:57:28 +08:00
2026-10-09 19:52:54 -07:00
2026-10-14 08:28:14 +08:00
2026-10-13 23:37:45 +08:00
2026-10-13 07:34:52 +08:00
2026-10-14 08:32:15 +08:00
2026-10-14 17:49:18 +08:00
2026-10-14 00:36:37 +08:00
2026-10-09 22:46:09 +08:00
2026-10-14 08:31:29 +08:00
2026-10-11 00:03:22 +08:00
2026-10-10 21:04:05 -07:00
2026-10-09 23:35:19 +08:00
2026-10-14 04:47:34 +08:00
2026-10-05 20:16:44 +08:00
2026-10-14 16:54:08 +08:00
2026-10-15 03:43:29 +08:00
2026-10-13 22:04:22 +08:00
2026-10-13 22:04:22 +08:00
2026-10-06 05:58:46 +08:00
2026-10-12 23:24:24 +08:00
2026-10-14 14:47:26 +08:00
2026-10-14 13:58:15 +08:00
2026-10-15 07:36:34 +08:00
2026-10-15 00:56:31 +05:30
2026-10-15 07:36:34 +08:00
2026-10-13 16:16:31 +08:00
2026-10-14 13:58:12 +08:00
2026-10-11 00:03:18 +08:00
2026-10-14 13:58:12 +08:00
2026-10-14 16:10:46 +08:00
2026-10-11 19:20:00 +08:00
2026-10-15 05:05:24 +08:00
2026-10-15 07:36:34 +08:00
2026-10-14 17:09:17 +08:00
2026-10-14 08:25:53 +08:00
2026-10-14 16:10:46 +08:00
2026-10-14 08:25:53 +08:00
2026-10-12 11:06:26 +08:00
2026-10-13 20:56:20 +08:00
2026-10-14 16:54:07 +08:00
2026-10-12 14:46:10 +08:00
2026-10-10 21:04:05 -07:00
2026-10-13 21:50:25 +08:00
2026-10-13 03:22:38 +08:00
2026-10-09 20:18:52 +08:00
2026-10-06 20:17:59 +08:00
2026-10-12 08:55:19 +08:00
2026-10-14 17:49:19 +08:00
2026-10-10 18:19:51 +08:00
2026-10-15 00:57:57 +08:00
2026-10-15 00:57:57 +08:00
2026-10-09 03:28:25 +00:00
2026-10-11 00:03:21 +08:00
2026-10-10 21:04:05 -07:00
2026-10-15 06:45:53 +08:00
2026-10-12 14:12:44 +08:00
2026-10-13 16:04:44 +08:00
2026-10-14 08:25:53 +08:00
2026-10-14 08:25:53 +08:00
2026-10-15 03:43:29 +08:00
2026-10-15 03:43:29 +08:00
2026-10-14 17:09:17 +08:00
2026-10-14 17:09:17 +08:00
2026-10-14 14:47:26 +08:00
2026-10-12 07:50:31 +08:00
2026-10-14 14:47:26 +08:00
2026-10-14 14:47:26 +08:00
2026-10-13 22:04:22 +08:00
2026-10-12 22:01:58 +08:00
2026-10-09 02:42:39 +08:00
2026-10-10 18:54:57 +08:00
2026-10-13 15:23:56 +08:00
2026-10-13 23:51:44 +08:00
2026-10-09 20:26:46 +08:00
2026-10-10 21:04:05 -07:00
2026-09-29 13:57:24 +08:00
2026-10-11 02:21:28 +08:00
2026-10-14 17:11:28 -07:00
2026-10-08 04:03:24 +08:00
2026-10-14 17:11:40 -07:00
2026-10-14 17:11:28 -07:00
2026-10-12 08:59:14 +08:00
2026-10-14 17:11:40 -07:00
2026-10-12 08:59:14 +08:00
2026-10-14 17:49:16 +08:00
2026-10-14 17:11:40 -07:00
2026-07-24 13:17:56 +00:00
2026-10-14 08:36:38 +08:00
2026-10-14 15:20:02 +08:00
2026-10-14 19:12:36 -07:00
2026-10-11 06:10:10 +08:00
2026-10-11 06:10:10 +08:00
2026-10-13 14:39:06 +08:00
2026-10-14 08:31:16 +08:00
2026-10-13 14:51:55 +08:00
2026-10-15 05:23:04 +08:00
2026-10-15 05:23:04 +08:00
2026-10-10 05:56:01 +08:00
2026-10-15 03:43:29 +08:00
2026-10-13 23:33:54 +08:00
2026-10-15 05:23:04 +08:00
2026-10-15 07:36:34 +08:00
2026-10-13 22:04:22 +08:00
2026-10-15 07:36:34 +08:00
2026-10-14 08:25:53 +08:00
2026-10-15 03:43:29 +08:00
2026-10-15 05:23:04 +08:00
2026-10-14 08:25:53 +08:00
2026-10-15 05:16:08 +08:00
2026-10-14 17:49:20 +08:00
2026-10-15 05:23:04 +08:00
2026-10-15 06:39:48 +08:00
2026-10-13 17:33:26 -07:00
2026-10-13 15:58:25 +08:00
2026-10-14 16:10:46 +08:00
2026-10-11 13:20:15 +08:00
2026-10-12 05:57:35 +08:00
2026-10-12 05:57:35 +08:00
2026-10-12 05:57:35 +08:00
2026-10-13 12:46:05 +08:00
2026-10-11 17:56:05 +08:00
2026-10-12 05:57:35 +08:00
2026-10-10 01:37:41 -07:00
2026-10-07 16:21:18 +08:00
2026-10-13 16:08:41 +08:00
2026-10-09 20:18:52 +08:00
2026-10-13 16:16:31 +08:00
2026-10-13 16:08:41 +08:00
2026-10-08 07:53:41 +08:00
2026-10-13 16:08:41 +08:00
2026-10-07 21:45:07 +08:00
2026-10-07 21:45:07 +08:00
2026-10-07 21:45:07 +08:00
2026-10-09 00:49:30 +08:00
2026-10-13 16:08:41 +08:00
2026-10-11 06:30:56 +08:00
2026-10-13 16:08:41 +08:00
2026-10-11 19:20:00 +08:00
2026-10-13 16:16:31 +08:00
2026-10-14 08:28:14 +08:00
2026-10-15 06:39:48 +08:00
2026-10-15 06:33:48 +08:00
2026-10-09 00:49:30 +08:00
2026-10-09 13:28:48 +08:00