note 98698 modified in function.htmlspecialchars by danbrown
| From: | danbrown@php.net | Date: | Thu, 01 Jul 2010 13:05:11 +0000 |
| Subject: | note 98698 modified in function.htmlspecialchars by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170623@lists.php.net to get a copy of this message | ||
I had problems with spanish special characters. So i think in using htmlspecialchars but my strings
also contain HTML.
So I used this :) Hope it help
<?php
function htmlspanishchars($str)
{
return str_replace(array("<", ">"), array("<",
">"), htmlspecialchars($str, ENT_NOQUOTES, "UTF-8"));
}
?>
--was--
I had problems with spanish special characters. So i think in using htmlspecialchars but my strings
also contain HTML.
So I used this :) Hope it help
function htmlspanishchars($str)
{
return str_replace(array("<", ">"), array("<",
">"), htmlspecialchars($str, ENT_NOQUOTES, "UTF-8"));
}
http://php.net/manual/en/function.htmlspecialchars.php