Merge pull request woocommerce/woocommerce-admin#2344 from woocommerce/add/paragraph-support-admin-notes

Allow paragraph tags in admin notes.
This commit is contained in:
Jeff Stieler 2019-05-30 10:40:59 -06:00 committed by GitHub
commit c10988bc54
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@
*/
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 default html => {

View File

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