htmlentities -- can it skip tags
| From: | Justin French | Date: | Mon, 15 Sep 2003 02:52:02 +0000 |
| Subject: | htmlentities -- can it skip tags | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162591@lists.php.net to get a copy of this message | ||
Hi all,
I need to convert some text from a database for presentation on screen... as per usual, characters like quotes and ampersands (&) are giving me grief. the obvious answer is to apply htmlspecialchars(), BUT this also converts all < and > into < and > signs, which destroys the html mark-up within the text.
Is there a non-tag equivalent of htmlspecialchars(), or do I need to build one?
TIA
Justin