Created
February 23, 2011 17:56
-
-
Save coreh/840819 to your computer and use it in GitHub Desktop.
This file contains 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
// Ele tirava todos os caracteres que não fossem alfa e aspas | |
$_q = preg_replace('/[^A-Za-z\']/i', '', $_REQUEST['query']); | |
// Agora ele tira todos que não forem alfa ou espaços, e corta os espaços do começo e do final. | |
// Preciso lidar com os acentos e tals ainda | |
$_q = preg_replace('/[^A-Za-z\'\s]/i', '', trim($_REQUEST['query'])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment