S Swift007 Banned Banned 49 2012 5 0 Oct 21, 2013 #1 Hello, do you know how can I fix the HTML failure on my site? I have a lot of post with a "-" in the title e.g Hello - 123 Look at the Picture pls: http://img841.imageshack.us/img841/4040/ffh4.png regards
Hello, do you know how can I fix the HTML failure on my site? I have a lot of post with a "-" in the title e.g Hello - 123 Look at the Picture pls: http://img841.imageshack.us/img841/4040/ffh4.png regards
D deliteblogger Active Member 331 2011 116 0 Oct 21, 2013 #2 Hi, &8211; is the ASCII code for the dash character. Try this code: PHP: function cleanWPMess($content) { $content = str_replace(array("–"), "-", $content); return $content; } add_filter('the_title', 'cleanWPMess'); add_filter('the_content', 'cleanWPMess'); add_filter('the_excerpt', 'cleanWPMess'); Add it to your theme's functions.php file.
Hi, &8211; is the ASCII code for the dash character. Try this code: PHP: function cleanWPMess($content) { $content = str_replace(array("–"), "-", $content); return $content; } add_filter('the_title', 'cleanWPMess'); add_filter('the_content', 'cleanWPMess'); add_filter('the_excerpt', 'cleanWPMess'); Add it to your theme's functions.php file.