May 16, 2005Previous : My Template for Wordpress Next : Download Sony DVD HandyCam USB Driver
Filed under: PHP Stuff — Gede @ 3:31 pm Tried for hours to get Wordpress to display code with html characters translated. I didn’t succeed. This how far I got:
$content = preg_replace("/(<code>)(.*)(<\/code>)/es", "'\\1'.htmlspecialchars('\\2').'\\3'", $content);
In function function the_content of templates_functions_post.php
But his unfortunately replaces also html that should not be replaced, like paragraphs breaks, and “nested” code things.
No Comments
No comments yet.
Leave a comment
You must be logged in to post a comment.
|