title: string replace \n or <br/> with &#xD; in as3
body: <p>Hi i have TextField in as3 in that i assigning the html value like</p>
  
  <pre><code>var TFhtmlText:String = "&lt;span class='Header'&gt;The value need to be 25 percentage  \n and percentage be 50 percent.&lt;/span&gt;"
  
   txtField.htmlText = TFhtmlText; 
  </code></pre>
  
  <p>from the above i need line break after 25 percentage for that i used <code>&lt;br/&gt;</code> but i got unwanted spaces between line break, so that now i used  <code>&amp;#xD</code>; for linebreak this is working fine , so i need to replace this (<code>&amp;#xD;</code>) character where <code>\n</code> is present .. i tried with </p>
  
  <pre><code>TFhtmlText = TFhtmlText.split('\n').join('&amp;#xD;')
   txtField.htmlText = TFhtmlText;
  
  
  TFhtmlText=TFhtmlText.replace(/\n/g, "&amp;#xD;");
  </code></pre>
  
  <p>But not working ....how can i achieve it</p>
  
  <p>thanks in advance   </p>