[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-librejs] LibreJS prevents some pages from loading
From: |
Rubén Rodríguez |
Subject: |
Re: [Bug-librejs] LibreJS prevents some pages from loading |
Date: |
Mon, 11 May 2015 21:01:17 +0200 |
El vie, 08-05-2015 a las 12:25 +0200, Fabio Pesari escribió:
> LibreJS prevents some pages from loading, such as these:
>
> https://www.gnu.org/software/acct/manual/html_chapter/accounting_2.html
>
> https://www.gnu.org/software/aris/manual/html_node/datatype.html
>
> https://www.gnu.org/software/classpathx/jaf/javadoc/about.html
>
> There's nothing special about those pages, the first two don't even have
> any JS code.
Technically there is something special about them, their <meta> tags
extend just beyond the first 1024 bytes, which is against the spec and
it is making LibreJS crash. I had no idea such a limit existed.
LibreJS shouldn't fail because if that, so I made a fix at
http://git.savannah.gnu.org/cgit/librejs.git/commit/?h=fix_charset_detect
that makes sure that only correct charset names are used during the
document parsing, which covers both this case and the case of having a
typo in a charset statement in a document.
Nik, could you review the change and publish a new release with it?
This was a weird thing to debug because I initially discovered that
-using the first of those links as example- removing *any* 4 characters
previous to the charset definition would make it work. At first I
thought there could be a multi-byte character somewhere causing a
misalignment in the parsing somehow, but it ended up being that the
charset definition (charset=us-ascii) fell halfway the 1024 character
mark, making it "us-a"... an odd coincidence and a pain to find!