public final class Encoding
extends java.lang.Object
| Constructor | Description |
|---|---|
Encoding() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
decodeHtml(java.lang.String s) |
Decodes HTML entities to produce a string containing only valid
Unicode scalar values.
|
static void |
encodeRcdataOnto(java.lang.String plainText,
java.lang.Appendable output) |
Appends an encoded form of plainText to putput where the encoding is
sufficient to prevent an HTML parser from transitioning out of the
RCDATA state.
|
public static java.lang.String decodeHtml(java.lang.String s)
s - text/htmlpublic static void encodeRcdataOnto(java.lang.String plainText,
java.lang.Appendable output)
throws java.io.IOException
<textarea> or
<title> element outside foreign content.plainText - text/plainoutput - a buffer of text/html that has a well-formed HTML prefix that
would leave an HTML parser in the Data state if it were to encounter a space
character as the next character. In practice this means that the buffer
does not contain partial tags or comments, and the most recently opened
element is `java.io.IOExceptionCopyright © 2019 OWASP. All rights reserved.