Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1831] XML parser unable to correctly handle numeric entities

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:18.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsAndroid
Labelsandroid, defect, parse, xml
ReporterOlivier Morandi
AssigneeDon Thorp
Created2011-04-15T03:03:25.000+0000
Updated2011-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 &#236;">
    e grave is &#232;
    </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

FileDateSize
app.js2011-04-15T03:03:26.000+00001100
test.xml2011-04-15T03:03:26.000+0000137

Comments

  1. Brion Vibber 2011-04-15

    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...

  2. Don Thorp 2011-04-15

    moving to fixed-in-qa for Thomas to verify. Thank Brion.

  3. Thomas Huelbert 2011-04-15

    created #1901 for 1.6 behavior, closing this as fixed. 1.4.2dc7b90

JSON Source