Re: bug in e4x? missing = in XML attribute
Martin Honnen <[email protected]> Tue, 17 Feb 2009 14:21:55 +0100
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
Leni wrote:
> Martin Honnen wrote:
>> I can't reproduce the issue with Firefox 3.0
>
> Just for good measure, I can now reproduce the problem using a test case
> similar to the one you used.
>
> Test case:
> http://www.zindus.com/tmp/test-case-2009-02-17-1.html
> The xml:
> http://www.zindus.com/tmp/test-case-2009-02-17-1.xml
>
> Firefox 3.0.6 error console reports:
> Error: illegal XML character
>
> The .xml is different to the one provided earlier, but the problem is
> the same - related to that unicode character, in this example it is just
> before the string "Jones".
I see that problem too with Firefox 3.0.6.
Now to move the problem into a bug report it would be best to have a
minimal test case, preferably, as the E4X XML constructor is implemented
by the JavaScript engine itself, a test case not even needing to load an
XML document with XMLHttpRequest, but rather a script test case doing
new XML(string) and causing the error.
I am however struggling to indentify the character causing the problem.
According to your earlier post, it is encoded in UTF-8 as 0xe2 0x80 0xa8
which would be the Unicode character U2028 I think.
However doing
var el = new XML('<foo>Line 1.\u2028Line 2.</foo>');
in Firefox 3.0.6 does not cause any error, so that way the character is
parsed fine. So either it is not that character causing the error or
that error only occurs with longer strings.
--
Martin Honnen
http://JavaScript.FAQTs.com/