AI2 Component  (Version nb184)
com.google.appinventor.components.common.HtmlEntities Class Reference

Static Public Member Functions

static Character toCharacter (String entityName)
 
static String decodeHtmlText (String htmlText)
 

Detailed Description

A mapping of Html entity names and their unicode codes.

Note: This was copied from the com.google.apps.mtrx.common.format.HtmlEntities and com.google.apps.mtrx.common.format.HtmlUtil classes.

Author
lizlo.nosp@m.oney.nosp@m.@goog.nosp@m.le.c.nosp@m.om (Liz Looney)

Definition at line 22 of file HtmlEntities.java.

Member Function Documentation

◆ decodeHtmlText()

static String com.google.appinventor.components.common.HtmlEntities.decodeHtmlText ( String  htmlText)
static

Decodes the given HTML text value.

HTML Character Entities such as &, <, >, ', and " are
changed to &, <, >, ', and ".
Entities such as &#xhhhh, and &#nnnn are changed to the appropriate characters.
Unrecognized entities are not decoded and no exception is thrown.
Parameters
htmlTextthe HTML text to decode
Returns
the decoded text

Definition at line 319 of file HtmlEntities.java.

◆ toCharacter()

static Character com.google.appinventor.components.common.HtmlEntities.toCharacter ( String  entityName)
static

Converts a named HTML entity such as "nbsp" or "amp" to its corresponding unicode character.

Parameters
entityNameName of the entity to convert to a character.
Returns
Unicode character corresponding with the entity, or null if non found.

Definition at line 302 of file HtmlEntities.java.


The documentation for this class was generated from the following file: