W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] URL: javascript URLs

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 28 Sep 2012 19:30:54 +0200
Message-ID: <CADnb78iupOjuOnuBdFXT8e_GsOe4O4wFenPsw2JgTEMr2CkDNw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: whatwg@lists.whatwg.org
On Fri, Sep 28, 2012 at 5:45 PM, Boris Zbarsky <bzbarsky@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. :/

Received on Friday, 28 September 2012 17:31:23 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:46 UTC