Re: bug in e4x? missing = in XML attribute
Leni <[email protected]> Tue, 17 Feb 2009 08:40:45 +1100
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
Martin Honnen wrote: > I can't reproduce the issue with Firefox 3.0 After the posting from [email protected] I did some more testing and found that I can't reproduce it when the e4x parsing happens inside a <browser> element. So ... here is another test case along the same lines. To run the test: - copy and paste the code below into a text editor and remove all the newlines - all the code should be on one line - copy and paste into the javascript error console and click evaluate The error console reports: Error: missing = in XML attribute Source File: Line: 3, Column: 2 Source Code: le><content>Alice, Kerry I can reproduce this in tb2, tb3beta1 and firefox 3.06. It's the \u2028 character in the code below which causes the problem. var str = "<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'><id>[email protected]</id><updated>2009-02-11T05:58:32.673Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/><generator version='1.0' uri='http://www.google.com/m8/feeds'>Contacts</generator><entry><app:edited xmlns:app='http://www.w3.org/2007/app'>2009-02-11T05:48:11.672Z</app:edited><title>Alice Midxxxxxx</title><content>Alice, Kerry \u2028Ex: Jones</content></entry></feed>";var xml = new XML(str.replace(/\<\?xml version=.*?\?\>/,"")); Regards - Leni.