wpseek.com
WordPress开发者和主题制作者的搜索引擎
wp_interactivity_as_dangerous_html › WordPress Function
Since7.2.0
已弃用n/a
› wp_interactivity_as_dangerous_html ( $html )
| 参数: |
|
| 返回: |
|
| 定义在: | |
| 文档: |
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.