note 20850 rejected from function.htmlentities by sander
| From: | sander@php.net | Date: | Thu, 18 Apr 2002 16:38:14 +0000 |
| Subject: | note 20850 rejected from function.htmlentities by sander | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29529@lists.php.net to get a copy of this message | ||
The html entity for a space is a space! It is only when there are 2 or more spaces next to each
other that there is a problem. I just use:
$html_text = ereg_replace(" "," ",htmlentities($text));
Thats 2 spaces replaced by a space and Might be slower but the html source produced is
far prettier and smaller.