Skip to content

Commit

Permalink
Specify URL encoding for links
Browse files Browse the repository at this point in the history
- Use the document encoding for link elements
- Always use UTF8 for link headers/early hints

Closes whatwg#9715
  • Loading branch information
noamr committed Sep 20, 2023
1 parent d6ce12a commit ec7151c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions source
Expand Up @@ -15548,9 +15548,10 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
a <span data-x="concept-request-destination">destination</span>, then return null.</p></li>

<li>
<p>Let <var>url</var> be the result of <span>encoding-parsing a URL</span> given
<var>options</var>'s <span data-x="link options href">href</span>, relative to
<var>options</var>'s <span data-x="link options base url">base URL</span>.</p>
<p>Let <var>url</var> be the result of applying the <span>URL parser</span> to
<var>options</var>'s <span data-x="link options href">href</span>, with
<var>options</var>'s <span data-x="link options base url">base URL</span> and
<var>options</var>'s <span data-x="link options encoding">encoding</span>.</p>

<p class="XXX">Passing the base URL instead of a document or environment is tracked by <a
href="https://github.com/whatwg/html/issues/9715">issue #9715</a>.</p>
Expand Down Expand Up @@ -15648,6 +15649,9 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
<dt><dfn data-x="link options base URL">base URL</dfn></dt>
<dd>A <span>URL</span></dd>

<dt><dfn data-x="link options encoding">encoding</dfn> (default <span>UTF-8</span>)</dt>
<dd>An <span>encoding</span></dd>

<dt><dfn data-x="link options origin">origin</dfn></dt>
<dd>An <span>origin</span></dd>

Expand Down Expand Up @@ -15701,6 +15705,10 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
<dt><span data-x="link options base URL">base URL</span></dt>
<dd><var>document</var>'s <span>document base URL</span></dd>

<dt><span data-x="link options encoding">encoding</span></dt>
<dd><var>document</var>'s <span data-x="document's
character encoding">character encoding</span></dd>

<dt><span data-x="link options origin">origin</span></dt>
<dd><var>document</var>'s <span data-x="concept-document-origin">origin</span></dd>

Expand Down

0 comments on commit ec7151c

Please sign in to comment.