Forums / Developer / Special characters - how to preserve html encoded entities.

Special characters - how to preserve html encoded entities.

Author Message

Kjell Rune Skaaraas

Monday 08 August 2005 3:54:10 am

I had a problem with special characters, and didn't see any fix by neither the developers or the community. Here's the fix:

In kernel\classes\datatypes\ezxmltext\handlers\output\ezxhtmlxmloutput.php:

After:
$text = htmlspecialchars( $tag->content() );
Add the following:
// Restore all existing HTML entities transformed by htmlspecialchars()
$text = preg_replace("/&(#[0-9]+|[a-z]+);/i", "&$1;", $text );