note 104271 deleted from function.filter-var by danbrown
| From: | danbrown@php.net | Date: | Sun, 05 Jun 2011 15:37:14 +0000 |
| Subject: | note 104271 deleted from function.filter-var by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180276@lists.php.net to get a copy of this message | ||
Note Submitter: Luke America
----
@maisqi:
You can strip multi-byte chars from the uri like this:
<?php
$uri = urldecode($uri) . ' ';
$len = mb_strlen($uri);
if ($len !== strlen($uri))
{
$convmap = array(0x0, 0x2FFFF, 0, 0xFFFF);
$uri = mb_decode_numericentity($uri, $convmap, 'UTF-8');
}
$uri = trim($uri);
?>