note 49547 added to function.htmlspecialchars

From: Date: Tue, 01 Feb 2005 10:46:34 +0000
Subject: note 49547 added to function.htmlspecialchars
Groups: php.notes 
Request: Send a blank email to php-notes+get-84311@lists.php.net to get a copy of this message
After inspecting the non-native encoding problem, I noticed that for example, if the encoding is cyrillic, and I write Latin characters that are not part of the encoding (æ for example - ae-ligature), the browser will send the real entity, such as &aelig; for this case. Therefore, the only way I see to display multilingual text that is encoded with entities is by: <?php echo str_replace('&amp;', '&', htmlspecialchars($txt)); ?> The regex for numeric entities will skip the Latin-1 textual entities. ---- Manual Page -- http://www.php.net/manual/en/function.htmlspecialchars.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49547 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49547&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49547&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49547&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49547&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49547&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49547&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84311) next »