There is something weird about my search engine..
I did a keyword search on this phrase
" A 1mm )(&()& "
at the end of the "A 1mm" were " )(&()& "
and the results returned had extra <b> b> thing between the keywords
This is <b>ab> <b>1mmb> Crack situated at the DB Engine Latch Cowling
i tried doing a search on A 1mm)(&()&
without the spacing between the 1mm and )(&()&
the results returned didn't have any <b> b>
So it is obviously due to the spacing between keyword and the special characters
You guys know how to resolve this?
$Keyword = (isset($_GET['Keyword'])) ? $_GET['Keyword'] : '';
$trimmedKeyword = trim($Keyword);
$trimmedKeyword = stripslashes($trimmedKeyword);
//filter special characters like ! , @ , #
$filter = array("\"" , "\\" , "!", "@" , "#" , "$" , "%" , "^" , "&" , "*" , "(", ")" , "-" , "_" , "+" , "-" , "{" , "}" , "[" , "]" , ";" , ":" , "'" , "<" , ">" , "," , "." , "?" , "/" , "|" );
$trimmedKeyword = str_replace($filter, '', $trimmedKeyword);
$trimmedKeyword = str_replace('"', '', $trimmedKeyword);
//trim whitespace from the stored variable
$trimmedKeyword = preg_replace('#\s+#',' ',$trimmedKeyword);
$trimmed_arrayKeyword = explode(" ",$trimmedKeyword);