Issues with HTML santization

Posted in: Newsmag
Post count: 36

We’ve been using the following in our functions.php to allow basic HTML in user profiles to prettify and format the text:

//disable WordPress sanitization to allow more than just $allowedtags from /wp-includes/kses.php
remove_filter('pre_user_description', 'wp_filter_kses');
//add sanitization for WordPress posts
add_filter( 'pre_user_description', 'wp_filter_post_kses');

And up until 1.7.2 this worked fine.

I’ve noticed that on our live 2.0 site, the HTML is now rendered out as plain text. I’ve copied the live site into our staging environment to troubleshoot this and if I switch to TwentyFifteen it’s once again rendered as HTML.

Did something change in 2.x?

Post count: 780

Hi pixeldynamo,

There where lots of changes for V2.0 but I don’t believe we affected the filters you wrote.

if may be due to this: http://screencast.com/t/dBPBCCmhNh71 (remove the esc_html function ). I will remove that function from the next version.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.