[whatwg] URL: javascript URLs

Anne van Kesteren annevk at annevk.nl
Fri Sep 28 10:30:54 PDT 2012

On Fri, Sep 28, 2012 at 5:45 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> In the case I was testing (just loading a file from file://), the
> javascript: URI is created from the string 'javascript:alert("%E2%84")' with
> charset set to ISO-8859-1.  When the URI parser is done with that, it has
> converted it to an internal representation that looks like
> 'javascript:alert("%C3%A2%E2%80%9E")' and then when you unescape and convert
> from UTF-8 you get those original two ISO-8859-1 chars.

Well that is interesting. So the document encoding is not solely a
query component affair? Does this only apply to javascript URLs? I
cannot get this to work for data URLs.

The URL parser certainly does not account for this behavior at the moment. :/


More information about the whatwg mailing list