Hello everyone,
I've recently come across a problem at work where in much of the data
we're getting is showing up in the data-grid as:
<b>The tags show<b> and the " quotes " aren't converted!
This is a problem and I'd like to be able to display this correctly:
The tags show and the " quotes " aren't converted!
We don't necessarily have too much control over the data, so I'm not
entirely sure how/why the items are coming up like this when some items
come up with characters like < > in them. For instance: "This is an item
> This is another item > In a breadcrumb trail". This shows up
correctly. I'm not sure what exactly should be done. But again since we
don't have control/access to the data, it cannot be changed or
substituted or converted to other formats. I thought of using htmlText
but that doesn't work if I have data like the "breadcrumb string" above
because it interprets the '<' characters as opening tags and doesn't
render the entire data:
[Bindable]
private var testString:String = "<b>6<b>
"seven"";
<mx:Text text="{testString}" /> <!-- displays testString unchanged -->
<mx:Text htmlText="{testString}" /> <!-- displays: <b>6</b> -->
Any suggestions would definitely be appreciated, I'm sure I'm probably
not the only person that's come across this :( But basically we just
need all characters like: < to be converted to '<' and & to be
'&' meanwhile data that was encoded properly, data that has '<' and '&'
showing up correctly should be left the same.
Thanks in advance for any help :)