AS3 에서 HTML에 관한것들.

Converting a string with html entities (such as &) to their respective symbols:

public static function htmlUnescape(str:String):String {
return new XMLDocument(str).firstChild.nodeValue;


Converting a string so that it has html entities:

public static function htmlEscape(str:String):String {
return XML( new XMLNode( XMLNodeType.TEXT_NODE, str ) ).toXMLString();


Encodes a string into a valid URI (Uniform Resource Identifier). Converts a complete URI into a string in which all characters are encoded as UTF-8 escape sequences unless a character belongs to a small group of basic characters.

The following table shows the entire set of basic characters that are not converted to UTF-8 escape sequences by the encodeURI function.

var utf:String = “parameters=” + encodeURI(jsonStr);

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s