Created
August 5, 2017 03:17
-
-
Save EncodeTheCode/75ddadabfc179a1d1a65e66b11939896 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sanitize_string($s) { | |
$r=preg_replace('/[^-_a-zA-Z0-9 `´¨¢$!?#&£€@×÷§©®°«»¥¡¿µ™…\Â\â\á\Á\à\À\ã\Ã\Ê\ê\É\é\È\è\Ë\ë\Î\î\Í\í\Ì\ì\Ï\ï\^\¹\²\³\¼\½\¾\+\=\~\‹\›\|\(\)\{\}\[\]\·.\w]+/','',html_entity_decode($s,ENT_QUOTES)); | |
return $r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment