public interface Encoders
MvcContext class as mvc.encoders.| Modifier and Type | Method and Description |
|---|---|
String |
html(String s)
Encoding for HTML code in attributes or content.
|
String |
js(String s)
Encoding for JavaScript code in attributes or script blocks.
|
String js(String s)
Encoding for JavaScript code in attributes or script blocks. It MUST support encoding of (at least) the following characters:
| Input Character | Encoding |
|---|---|
| U+0008 (BS) | \b |
| U+0009 (HT) | \t |
| U+000A (LF) | \n |
| U+000C (FF) | \f |
| U+000D (CR) | \r |
| / | \/ |
| \ | \\ |
| " | \x22 |
| & | \x26 |
| ' | \x27 |
| U+0000-U001F | \x## |
s - string to encode.Copyright © 2015 Oracle Corporation. All rights reserved.