note 65952 added to function.htmlentities

From: Date: Wed, 10 May 2006 18:01:06 +0000
Subject: note 65952 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-111079@lists.php.net to get a copy of this message
I've been asked why I assembled such intricate functions to convert to entities when I could use a very simple solution (like the one offered by soapergem below). The biggest reason is that the PHP htmlentities function and most of the other solutions listed below go haywire on multi-byte strings. In addition, the entire range of numbered entities from &#129; through &#159; are invalid characters, and should not be used (as noted by mail at britlinks dot com below). Most htmlentity functions also do not convert ampersands or pointy brackets (<>) to entities. The ones that do often reconvert existing entities (&amp; becomes &amp;amp;). ---- Server IP: 64.71.164.2 Probable Submitter: 68.6.44.131 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit -- http://master.php.net/note/edit/65952 Del: integrated -- http://master.php.net/note/delete/65952/integrated Del: useless -- http://master.php.net/note/delete/65952/useless Del: bad code -- http://master.php.net/note/delete/65952/bad+code Del: spam -- http://master.php.net/note/delete/65952/spam Del: non-english -- http://master.php.net/note/delete/65952/non-english Del: in docs -- http://master.php.net/note/delete/65952/in+docs Del: other reasons-- http://master.php.net/note/delete/65952 Reject -- http://master.php.net/note/reject/65952 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111079) next »