This content has been marked as final. Show 4 replies
Perhaps I have just missed it, but I have not found an htmlEncode function in AS. So i have done this by creating my own encode function using replace. There are examples of that available.1 person found this helpful
But, probably the best solution is to escape() the string when you send it to the server, then u n e s c a p e() it when you receive it.
This is bizarre, the forum software says I have censored words in my post!
Yeah, looks like *u n e s c a p e* is a no-no. Is there some meaning to that word that I do not know?1 person found this helpful
I have tried esc ape and unes cape.
But these are my results:
var Str: String = '<foo>rock & roll</foo>';
This will come to:
Thats fine for sending data, but putting it back with un esc ape will just give me the original back (as expected).
But I want my < to be < or the equivelant ascii code d
In PHP you use htmlentities or htmlencode, but in Flex is a mystery.
Sorry, didn't read your post properly, I think I will have to come up with my own replace function then :(
google it, you will find examples.