Skip to content

Commit

Permalink
Fix: allow valid percent encoded code points in the host of non-speci…
Browse files Browse the repository at this point in the history
…al URL

URL-host parser fix: decode percent encoded code points before the
forbidden host code points check
  • Loading branch information
rmisev committed Jan 26, 2017
1 parent cb146b9 commit 349c802
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,12 @@ and a boolean <var>isSpecial</var>, and then runs these steps:</p>
<li><p>If <var>isSpecial</var> is true, then return the result of
<a lt="host parser">host parsing</a> <var>input</var>.

<li><p>If <var>input</var> contains a <a>forbidden host code point</a>, <a>syntax violation</a>,
<li><p>Let <var>buffer</var> be the result of
<a>UTF-8 decode without BOM</a> on the
<a lt="percent decode">percent decoding</a> of
<a>UTF-8 encode</a> on <var>input</var>.

<li><p>If <var>buffer</var> contains a <a>forbidden host code point</a>, <a>syntax violation</a>,
return failure.

<li><p>Let <var>output</var> be the empty string.
Expand Down

0 comments on commit 349c802

Please sign in to comment.