Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,12 @@ resource the <a for=/>URL</a>'s other components identify. It is initially null.
<p id=non-relative-flag>A <a for=/>URL</a> also has an associated
<dfn export for=url>cannot-be-a-base-URL flag</dfn>. It is initially unset.

<p>A <a for=/>URL</a> also has an associated <dfn export for=url>potentially-dangling-markup
flag</dfn>, which is initially unset.

<p class="note no-backref">This flag will be set if both <a>ASCII tab or newline</a> characters are
removed from a URL, and an 0x3C (&lt;) character is encountered during parsing.

<p>A <a for=/>URL</a> also has an associated
<dfn export for=url id=concept-url-object>object</dfn> that is null, a {{Blob}} object, a
{{MediaSource}} object, or a {{MediaStream}} object. It is initially null.
Expand Down Expand Up @@ -1342,9 +1348,32 @@ string <var>input</var>, optionally with a <a>base URL</a> <var>base</var>, opti
<li><p>Remove any leading and trailing <a>C0 control or space</a> from <var>input</var>.
</ol>

<li><p>If <var>input</var> contains any <a>ASCII tab or newline</a>, <a>validation error</a>.
<li>
<p>If <var>input</var> contains any <a>ASCII tab or newline</a>, then:

<ol>
<li><p><a>validation error</a>.

<li><p>Let <var>processed</var> be an empty string.

<li>
<p>For each <var>byte</var> in <var>input</var>:

<ol>
<li>
<p>If <var>byte</var> is not an <a>ASCII tab or newline</a> character:

<li><p>Remove all <a>ASCII tab or newline</a> from <var>input</var>.
<ol>
<li><p>Append <var>byte</var> to <var>processed</var>.

<li><p>If <var>byte</var> is U+003C (&lt;), set <var>url</var>'s
<a>potentially-dangling-markup flag</a>.
</ol>

</ol>

<li><p>Set <var>input</var> to <var>processed</var>.
</ol>

<li><p>Let <var>state</var> be <var>state override</var>
if given, or <a>scheme start state</a> otherwise.
Expand Down