Function: wpKsesPost()
wpKsesPost(
content,allowList?,options?):string
Defined in: packages/core/src/dom/wpKsesPost.ts:31
Sanitize HTML content by the wp_kses_post() requirements
Usage
import { wpKsesPost } from '@headstartwp/core';
wpKsesPost(html);
Parameters
content
string
The content to sanitize.
allowList?
IWhiteList
Optional. The list of allowed HTML tags and attributes. If not set, the default allow list will be used.
options?
IWpKsesPostOptions
Optional. IWpKsesPostOptions.
Returns
string
Sanitized string of HTML.