Package org.jsoup.nodes

## Class Entities

- java.lang.Object
- - org.jsoup.nodes.Entities

    public class Entities
    extends java.lang.Object

HTML entities, and escape routines. Source: W3C HTML named character references.

### Nested Class Summary

Nested Classes
`static class` `Entities.EscapeMode`

### Method Summary

All Methods Static Methods Concrete Methods
`static int` `codepointsForName​(java.lang.String name, int[] codepoints)`
`static java.lang.String` `escape​(java.lang.String string)` HTML escape an input string, using the default settings (UTF-8, base entities).
`static java.lang.String` `escape​(java.lang.String string, Document.OutputSettings out)` HTML escape an input string.
`static java.lang.String` `getByName​(java.lang.String name)` Get the character(s) represented by the named entity
`static boolean` `isBaseNamedEntity​(java.lang.String name)` Check if the input is a known named entity in the base entity set.
`static boolean` `isNamedEntity​(java.lang.String name)` Check if the input is a known named entity
`static java.lang.String` `unescape​(java.lang.String string)` Un-escape an HTML escaped string.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### isNamedEntity

    public static boolean isNamedEntity​(java.lang.String name)

Check if the input is a known named entity

Parameters:
  `name` - the possible entity name (e.g. "lt" or "amp")
Returns:
  true if a known named entity

#### isBaseNamedEntity

    public static boolean isBaseNamedEntity​(java.lang.String name)

Check if the input is a known named entity in the base entity set.

Parameters:
  `name` - the possible entity name (e.g. "lt" or "amp")
Returns:
  true if a known named entity in the base set
See Also:
  `isNamedEntity(String)`

#### getByName

    public static java.lang.String getByName​(java.lang.String name)

Get the character(s) represented by the named entity

Parameters:
  `name` - entity (e.g. "lt" or "amp")
Returns:
  the string value of the character(s) represented by this entity, or "" if not defined

#### codepointsForName

    public static int codepointsForName​(java.lang.String name,
                                        int[] codepoints)

#### escape

    public static java.lang.String escape​(java.lang.String string,
                                          Document.OutputSettings out)

HTML escape an input string. That is, `<` is returned as `&lt;`

Parameters:
  `string` - the un-escaped string to escape
  `out` - the output settings to use
Returns:
  the escaped string

#### escape

    public static java.lang.String escape​(java.lang.String string)

HTML escape an input string, using the default settings (UTF-8, base entities). That is, `<` is returned as `&lt;`

Parameters:
  `string` - the un-escaped string to escape
Returns:
  the escaped string

#### unescape

    public static java.lang.String unescape​(java.lang.String string)

Un-escape an HTML escaped string. That is, `&lt;` is returned as `<`.

Parameters:
  `string` - the HTML string to un-escape
Returns:
  the unescaped string