note 108222 added to function.htmlentities
| From: | ustimenko dot alexander at gmail dot com | Date: | Mon, 09 Apr 2012 14:15:48 +0000 |
| Subject: | note 108222 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187024@lists.php.net to get a copy of this message | ||
For those Spanish (and not only) folks, that want their national letters back after htmlentities :)
<?php
protected function _decodeAccented($encodedValue, $options = array()) {
$options += array(
'quote' => ENT_NOQUOTES,
'encoding' => 'UTF-8',
);
return preg_replace_callback(
'/&\w(acute|uml|tilde);/',
create_function(
'$m',
'return html_entity_decode($m[0], ' . $options['quote'] . ',
"' .
$options['encoding'] . '");'
),
$encodedValue
);
}
?>
----
Server IP: 195.54.192.44
Probable Submitter: 94.180.116.205
----
Manual Page -- http://www.php.net/manual/en/function.htmlentities.php
Edit -- https://master.php.net/note/edit/108222
Del: integrated -- https://master.php.net/note/delete/108222/integrated
Del: useless -- https://master.php.net/note/delete/108222/useless
Del: bad code -- https://master.php.net/note/delete/108222/bad+code
Del: spam -- https://master.php.net/note/delete/108222/spam
Del: non-english -- https://master.php.net/note/delete/108222/non-english
Del: in docs -- https://master.php.net/note/delete/108222/in+docs
Del: other reasons-- https://master.php.net/note/delete/108222
Reject -- https://master.php.net/note/reject/108222
Search -- https://master.php.net/manage/user-notes.php