Allow paragraph tags in admin notes.

This commit is contained in:
Jeff Stieler 2019-05-29 16:28:37 -06:00
parent 186aa90c90
commit 8fad6e7dd7
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@
*/ */
import { sanitize } from 'dompurify'; import { sanitize } from 'dompurify';
export const ALLOWED_TAGS = [ 'a', 'b', 'em', 'i', 'strong' ]; export const ALLOWED_TAGS = [ 'a', 'b', 'em', 'i', 'strong', 'p' ];
export const ALLOWED_ATTR = [ 'target', 'href', 'rel', 'name', 'download' ]; export const ALLOWED_ATTR = [ 'target', 'href', 'rel', 'name', 'download' ];
export default html => { export default html => {

View File

@ -356,6 +356,7 @@ class WC_Admin_Note extends WC_Data {
'valueless' => 'y', 'valueless' => 'y',
), ),
), ),
'p' => array(),
); );
$content = wp_kses( $content, $allowed_html ); $content = wp_kses( $content, $allowed_html );