I am using this snippet.
function html_sanitize_text( $input ) {
return wp_kses_post( force_balance_tags( $input ) );
}
I am using this to sanitze html
in the Wordpress customizer.
The html inside this text field is <i class="fa fa-laptop" aria-hidden="true"></i>
when saving my changes in the customizer - then refresh - then go back to this field inside the customizer, Wordpress strips/removes aria-hidden="true"
.
Any idea why? and how to work around this?
Thanks