How allow some html tags?

What is the best way to allow some html tags.

<?php echo htmlspecialchars_decode( wp_kses( get_theme_mod( xxx_copyright_text' ), array('a' => array())) ); ?> I got this message from the reviewer: Data Validation issues have been found in your theme. All dynamic data must be correctly escaped for the context where it is rendered. - All dynamic data must be escaped with esc_attr() before rendered in an html attribute. - Whenever you are rendering a url to the screen its value must be passed through esc_url() first. - If dynamic data is rendered inside an attribute that triggers a JavaScript event, it must be escaped with esc_js().

Use wp_kses_post it allows all allowed HTML entities.

1 Like

Great. Thanks.