feat: add the allowed script attribute (#363)

pull/369/head
Seaton Jiang 2021-04-15 10:58:06 +08:00
parent 8251b1189b
commit b0e30b6ff8
No known key found for this signature in database
GPG Key ID: C1086BAE716FF138
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ function custom_sanitize_textarea($input)
"height" => array(),
"width" => array(),
);
$custom_allowedtags["script"] = array("type" => array(), "src" => array());
$custom_allowedtags["script"] = array("type" => array(), "src" => array(), "async" => array(),);
$custom_allowedtags = array_merge($custom_allowedtags, $allowedposttags);
$output = wp_kses($input, $custom_allowedtags);
return $output;