UIZE JavaScript Framework

MODULES Uize.Util.Html.Encode

1. Introduction

The Uize.Util.Html.Encode package defines utility methods for HTML encoding and HTML decoding of strings.

DEVELOPERS: Chris van Rensburg

1.1. Examples

There are no dedicated showcase example pages for the Uize.Util.Html.Encode module.

SEARCH FOR EXAMPLES

Use the link below to search for example pages on the UIZE Web site that reference the Uize.Util.Html.Encode module...

SEARCH

1.2. Implementation Info

The Uize.Util.Html.Encode module defines the Uize.Util.Html.Encode package under the Uize.Util.Html namespace.

1.2.1. Features Introduced in This Module

1.2.2. Features Overridden in This Module

No features have been overridden in this module.

1.2.3. Features Inherited From Other Modules

This module has no inherited features.

1.2.4. Modules Directly Under This Namespace

There are no modules directly under this namespace.

1.2.5. Unit Tests

The Uize.Util.Html.Encode module is unit tested by the Uize.Test.Uize.Util.Html.Encode test module.

2. Static Methods

2.1. Uize.Util.Html.Encode.decode

Returns a string, representing the decoded form of the specified HTML-encoded string.

SYNTAX

unencodedAttributeValueSTR = Uize.Util.Html.Encode.decode (encodedAttributeValueSTR);

This method supports decoding the full set of 252 character entities contained in the HTML 4 specification, as well as entities encoded using the forms &#nnnn; and &#xhhhh; (where nnnn and hhhh are the Unicode character code of the character in decimal and hexadecimal formats, respectively).

EXAMPLE

unencoded = Uize.Util.Html.Encode.decode (
  'solar & wind beats "fossil" fuels'
);

After executing the above statement, the variable unencoded would have the value 'solar & wind beats "fossil" fuels'.

NOTES

see also the corresponding Uize.Util.Html.Encode.encode static method

IMPLEMENTATION INFO

this feature was introduced in this module

2.2. Uize.Util.Html.Encode.encode

Returns a string, representing the HTML-encoded form of the specified string.

SYNTAX

encodedAttributeValueSTR = Uize.Util.Html.Encode.encode (unencodedAttributeValueSTR);

EXAMPLE

encodedValue = Uize.Util.Html.Encode.encode ('solar & wind beats "fossil" fuels');

After executing the above statement, the variable encodedValue would have the value 'solar & wind beats "fossil" fuels'.

NOTES

see also the corresponding Uize.Util.Html.Encode.decode static method

IMPLEMENTATION INFO

this feature was introduced in this module

2.3. Uize.Util.Html.Encode.encodeTextNode

IMPLEMENTATION INFO

this feature was introduced in this module

3. Static Properties

3.1. Uize.Util.Html.Encode.entityRegExp

IMPLEMENTATION INFO

this feature was introduced in this module

3.2. Uize.Util.Html.Encode.moduleName

IMPLEMENTATION INFO

this feature was introduced in this module

3.3. Uize.Util.Html.Encode.pathToResources

IMPLEMENTATION INFO

this feature was introduced in this module