How do you encode XML safely with ActionScript 3? -


I am capturing data from the user and writing it as an XML string:

Var MyXml: XML = {userEnteredText}

It is alright and as long as the user becomes lovable with special characters like "and & amp; lt;>" illegal then Illegal characters are also problems like 0x19.

Is there a way to senate my XML and encode special characters or do I have to roll my roll?

  var s: string = "test or lieutenant; or> test ";  Var x: XML = & lt; Xml / & gt; X.appendChild (s); Trace (x.toXMLString ()); // output "& lt; xml> test & lift; ie & gt; test & lt; / xml & gt;"  

Also, you can make content of all the contents ...

I'm not sure why 0x19 should be illegal ... white space and nalbite often Are dropped ... but if it is binary data that you want, then you should probably use it ...


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -