Tag: format

Remove MS Word Formatting

I recently noticed that this can cause issues with embeds, if they aren’t previously defined as allowed.

add_filter( 'the_content', 'msd_remove_msword_formatting' );
function msd_remove_msword_formatting($content){
	global $allowedposttags;
	$allowedposttags['span']['style'] = false;
	$content = wp_kses($content,$allowedposttags);
	return $content;
}