0 Replies Latest reply on Jul 22, 2008 3:13 PM by Hamshmam

    String auto-converts HTML characters?

    Hamshmam Level 1
      Hi all, I have an XML document that contains a field like this:

      <someHTML>&lt;b&gt;ThisIsBolded&lt;/b&gt;</someHTML>

      Now, I want to put this correctly-rendered HTML into the htmlText portion of a Text tag. Which I try to accomplish using the following:

      var nodeHTML:String = node.someHTML.toString();
      trace(nodeHTML); // Output: <b>ThisIsBolded</b> (what!? I didn't replace anything!)
      nodeHTML.replace("<","&lt;").replace(">","&gt;");
      trace(nodeHTML); // Output: <b>ThisIsBolded</b> (what!? replacement didn't do anything!)
      myText.htmlText += nodeBody + "\n"; // Output: Plaintext output, no bolding! But also no tags...?

      Does anyone know what is going on? It seems like I can't display HTML in the htmlText property. Any help would be appreciated.