Replace junk HTML entities in get_html_translation_table?
Posted: Thu Jan 22, 2009 7:34 pm
I'd like to replace the junk HTML entities in get_html_translation_table with the numeric versions.
So example I don't want...
< = <
> = >
& = &
I'd rather use...
< = <
> = >
& = &
I know we can use unset, here is what I've tried...
So example I don't want...
< = <
> = >
& = &
I'd rather use...
< = <
> = >
& = &
I know we can use unset, here is what I've tried...
Code: Select all
<?php
$table = get_html_translation_table();
unset($table["<"]);
unset($table[">"]);
$table["<"] = <
$table[">"] = >
echo htmlspecialchars('<br />hello world<br />');
?>