Add lib/utils.php file
Added simple shell/utf/html escape checking Added a collection of test cases (we need some more escape checking ones) Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
This commit is contained in:
10
lib/utils.php
Normal file
10
lib/utils.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
//
|
||||
// Helper functions
|
||||
//
|
||||
|
||||
function utf8_urldecode($str) {
|
||||
$str = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($str));
|
||||
return html_entity_decode($str,null,'UTF-8');;
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user