</span> causing extra space in htmlText
I'm loading text from an xml file that has some CDATA as well as <span class> in it. The xml file would look like this:
<?xml version="1.0"? encoding="utf-8"?>
<allPages id="Execution Management - Replanner" version="1.6" template="djc2_1_5" audioType="MP3" videoType="WMV">
<page id="8">
<narration>
<![CDATA[hello<step>Step 1 text <span class = 'mycolor'>with some text followed by a comma</span>, followed by some more text</step>]]>
</narration>
</page>
</allPages>
The problem I'm getting is when i put the CDATA text into a textfield, an extra space is being added after the </span. ie. "with some text followed by a comma ,". This space is being added only if there is some kind of punctuation immediately following </span> in the xml document. I've tried getting rid of it with regular expressions and split().join but nothing has worked.