PDA

View Full Version : HTML entities in results


scarydog
05-17-2005, 05:45 PM
Hi there,

we use a script to encode email addresses i.e auckland@ajpark.com -->& #97;& #117;& #99;& #107;& #108;& #97;& #110;& #100;& #64;& #97;& #106;& #112;& #97;& #114;& #107;& #46;& #99;& #111;& #109;

This is at the request of our client so that the email addresses are not so easily harvested. It would be great if there was some way of keeping these encoded in the results, as our client is complaining about see the ;j etc

Is there anyway to make this happen?

Charter
05-19-2005, 07:28 AM
In search_function.php find where the PHP htmlspecialchars function is used on $title, $table_results, and $extract, and then wrap the htmlspecialchars function with something like the following:

$foo = str_replace("&","&",htmlspecialchars($foo,ENT_QUOTES));