wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_interactivity_as_dangerous_html › WordPress Function
Since7.2.0
Deprecatedn/a
› wp_interactivity_as_dangerous_html ( $html )
| Parameters: |
|
| Returns: |
|
| Defined at: | |
| Codex: |
Marks an HTML string as trusted, for `data-wp-html` to render as the content of an element.
The returned token is the only valuedata-wp-html renders in server directive processing.
Warning: this function does not sanitize the HTML. Passing untrusted input, such as
user-submitted content, creates a cross-site scripting (XSS) vulnerability. Sanitize it
first, for example with wp_kses_post(), or build it only from trusted markup.
A value read from context must never become a token, directly or after being copied into
state. Context selects and state supplies: context is controlled by the client or by markup,
so it may only select among tokens that server-side code created, and must never be the
HTML a token is created from.