public class HtmlHelper
extends java.lang.Object
Scope as "html", contains a bunch of functions you can call from your script related
to HTML and HTML processing.| Constructor and Description |
|---|
HtmlHelper() |
| Modifier and Type | Method and Description |
|---|---|
SafeString |
escape(SafeString html)
Escape the HTML.
|
SafeString |
escape(java.lang.String html)
Escape the HTML.
|
SafeString |
safe(java.lang.String html)
Mark the given string as "safe" for direct outputting.
|
public SafeString safe(java.lang.String html)
html - The string you want to mark as safe. The string will not be escaped on output, even if
Configuration.getAutoEscape() is true.SafeString.public SafeString escape(java.lang.String html)
html - The string you want to HTML-escape.SafeString (so that the string doesn't get double-escaped).public SafeString escape(SafeString html)
SafeString, and because we already know a safe string is safe
to output, we won't escape it again.html - The string you want to HTML-escape.SafeString you passed in.