[TIMOB-1831] XML parser unable to correctly handle numeric entities
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect, parse, xml |
Reporter | Olivier Morandi |
Assignee | Don Thorp |
Created | 2011-04-15T03:03:25.000+0000 |
Updated | 2011-04-17T01:57:18.000+0000 |
Description
When an XML file (or HTTP xml response message) contains some
numeric entities for special characters (e.g. ë), these are
correctly handled only when they are found in an attribute, but not
when they are present inside the inner text of an element, as
stated in Q&A (http://developer.appcelerator.com/question/56091/xml-parser-unable-to-correctly-handle-numeric-entities-android)[http://developer.appcelerator.com/question/56091/xml-parser-unable-to-correctly-handle-numeric-entities-android]">http://developer.appcelerator.com/question/56091/xml-parser-unable-....
For example, given the following xml text:
<?xml version="1.0" encoding="utf-8"?>
<root>
<element1 attribute1="i grave is ì">
e grave is è
</element1>
</root>
The value of attribute1 is correctly parsed as "i grave is
ì", while element1 inner text is parsed as "e grave is".
In attachment you find this xml file and an app.js for the test
case.
Attachments
File | Date | Size |
---|---|---|
app.js | 2011-04-15T03:03:26.000+0000 | 1100 |
test.xml | 2011-04-15T03:03:26.000+0000 | 137 |
Runs fine with current master build; this is already fixed by the fix for https://appcelerator.lighthouseapp.com/projects/32238/tickets/862-on-android-cdata-from-xml-returns-blank"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/862-o...
moving to fixed-in-qa for Thomas to verify. Thank Brion.
created #1901 for 1.6 behavior, closing this as fixed. 1.4.2dc7b90