s@rdalya

 

TextFormatter

Page history last edited by vozcelik 3 yrs ago


 

TextFormatter

(extends Object)


Object Summary

 

A helper object for formatting Strings.


Constructor

This object does not have a constructor. It is statically accessed.


Methods

 

 

TextFormatter.escape(strText)

 

parameters

strText - The text to encode.

 

returns

The encoded text.

 

comments

Encodes strText so that it can be used as a part of a URI, or an AJAX GET or POST request.


TextFormatter.safeHTML(strSource)

 

parameters

strSource - The text to format.

 

returns

The formatted text.

 

comments

Converts the text so that it does not alter the HTML structure when passed as an innerHTML to a div.


TextFormatter.safeWhiteSpace(strSource)

 

parameters

strSource - The text to format.

 

returns

The formatted text.

 

comments

Trims unneccessary whitespace from strSource.


TextFormatter.splitQueryString(strURL)

 

parameters

strURL - The QueryString to convert.

 

returns

An associative array containin name,value pairs of the QueryString.

 

comments

The method will be useful for AJAX calls.


See Also

 

None given.


Usage Examples

 

Comments (0)

You don't have permission to comment on this page.