James liu wrote: > first, u should escape some string like (code by php) > >> function escapeChars($string) { >> > $string = str_replace("&", "&", $string); > > $string = str_replace("<", "<", $string); > > $string = str_replace(">", ">", $string); > > $string = str_replace("'", "'", $string); > > $string = str_replace('"', """, $string); > > > return $string; > > }
php has this as a built in function. $string = htmlentities($string); that's what i use to protect my solr input. -jsd-