Libraries
Html_ent Source Code
 previous   up   next 

Function Summary
string
decodeHtmlEntities (in string: stri)
Decode a string, which contains HTML entities.
string
encodeHtmlEntities (in string: stri)
Encode a string with HTML entities.
string
encodeHtmlContent (in string: stri)
Encode a string, such that it can be used as HTML content.
string
quoteHtmlAttrValue (in string: stri)
Encode and quote a string, such that it can be used as HTML attribute value.

Function Detail

decodeHtmlEntities

const func string: decodeHtmlEntities (in string: stri)

Decode a string, which contains HTML entities.

Returns:
a string were all HTML entities are replaced by the corresponding characters.

encodeHtmlEntities

const func string: encodeHtmlEntities (in string: stri)

Encode a string with HTML entities. This function encodes all characters, which can be described as HTML entities.

Returns:
a string were characters are replaced by the corresponding HTML entity.

encodeHtmlContent

const func string: encodeHtmlContent (in string: stri)

Encode a string, such that it can be used as HTML content. HTML content is the text between HTML start tag and end tag. In HTML content only the characters '&' and '<' must be encoded.

Returns:
a string were & and < are encoded as HTML entities.

quoteHtmlAttrValue

const func string: quoteHtmlAttrValue (in string: stri)

Encode and quote a string, such that it can be used as HTML attribute value. HTML attribute values are used in HTML start tags. This function quotes an HTML attribute value with double quotes ("). The characters '<', '>', '\"' and '&' are encoded with the predefined HTML entities &amp;lt;, &amp;gt;, &amp;quot; and &amp;amp;.

Returns:
a quoted string were < > " and & are encoded as HTML entities.


 previous   up   next