[TIMOB-3551] CDATA not parsed in strings.xml
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Tooling |
Labels | RTN, cb-tooling, cdata, html, strings, xml |
Reporter | netspy |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:46:33.000+0000 |
Updated | 2020-01-09T19:49:39.000+0000 |
Description
A CDATA section in strings.xml is not parsed by Titanium. This could be necessary if HTML entities are needed.
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="test"><![CDATA[<h1>Headline</h1>]]></string>
</resources>
L('test') returns only an empty string.
Confirmed, this is still an issue in Titanium master (currently 6.1.0). The
i18n.js
file intitanium-sdk/lib
only grabs the first child:Since CDATA would introduce more than one child node, we only get the first child node. We will need to serialize the entire node and it's children to a string to be returned.