Make relative-URL-with-fragment string account for opaque-path base URLs · whatwg/url@24deb59
annevk
·
2026-07-01
·
via Recent Commits to url:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2033,8 +2033,14 @@ followed by zero or more of <a>ASCII alphanumeric</a>, U+002B (+), U+002D (-), a
|
2033 | 2033 | [[RFC7595]] |
2034 | 2034 | |
2035 | 2035 | <p>A <dfn export oldids=syntax-url-relative-with-fragment>relative-URL-with-fragment string</dfn> |
2036 | | -must be a <a>relative-URL string</a>, optionally followed by U+0023 (#) and a |
2037 | | -<a>URL-fragment string</a>. |
| 2036 | +must be: |
| 2037 | + |
| 2038 | +<ul class=brief> |
| 2039 | +<li><p>the empty string, if <a>base URL</a> has an <a for=url>opaque path</a>; |
| 2040 | +<li><p>otherwise, a <a>relative-URL string</a>, |
| 2041 | +</ul> |
| 2042 | + |
| 2043 | +<p>optionally followed by U+0023 (#) and a <a>URL-fragment string</a>. |
2038 | 2044 | |
2039 | 2045 | <p>A <dfn export oldids=syntax-url-relative>relative-URL string</dfn> must be one of the following, |
2040 | 2046 | switching on <a>base URL</a>'s <a for=url>scheme</a>: |
@@ -2060,7 +2066,7 @@ switching on <a>base URL</a>'s <a for=url>scheme</a>:
|
2060 | 2066 | <p>any optionally followed by U+003F (?) and a <a>URL-query string</a>. |
2061 | 2067 | |
2062 | 2068 | <p class=note>A non-null <a>base URL</a> is necessary when <a lt="URL parser">parsing</a> a |
2063 | | -<a>relative-URL string</a>. |
| 2069 | +<a>relative-URL-with-fragment string</a>. |
2064 | 2070 | |
2065 | 2071 | <p>A <dfn export>scheme-relative-special-URL string</dfn> must be "<code>//</code>", followed by a |
2066 | 2072 | <a>valid host string</a>, optionally followed by U+003A (:) and a <a>URL-port string</a>, optionally |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。