Character Classes

I have a small serch engine written in php with mysql database.
My config file for my php search has this piece of code that I believe that i must edit in order to keep search strings from appearing as such:

…d Schools Academic Media & Technology ITS Access Map for People with Disabiliti… …onal Schools Admissions Information, Undergraduate African American Studies Afri… …ale Alumni Alumni Magazine, Yale Alumni Schools Committee ASC American Chemica… …e University Art, School of Arts and Sciences Academic Departments Arts and Scie…

I prefer, like anyone would, to have a complete block of readable text to appear in the serach page.

Here is the code that I believe that I must edited, however, I do not know how to do this correctly.

[code]// $allowed_link_chars = “[:%/?=&;,._a-zA-Z0-9|+ ()~-]"; // includes space and () - not good with javascript
$allowed_link_chars = "[:%/?=&;,._a-zA-Z0-9|+~-]
”;

//----------HTML ENTITIES
$spec = array( “&amp” => “&”,
“&agrave” => “?”,
“&egrave” => “?”,
“&ugrave” => “?”,
“ó” => “?”,
“&eacute” => “?”,
“&icirc” => “?”,
“&ocirc” => “?”,
“&ucirc” => “?”,
“&ecirc” => “?”,
“&ccedil” => “?”,
“&#156” => “oe”,
“&gt” => " ",
“&lt” => " ",
“&deg” => " ",
“&apos” => “’”,
“&quot” => " ",
“&acirc” => “?”,
“&iuml” => “?”,
“&euml” => “?”,
“&auml” => “?”,
“&Auml” => “?”,
“&Euml” => “?”,
“&Iuml” => “?”,
“&Uuml” => “?”,
“&ouml” => “?”,
“&uuml” => “?”,
“&nbsp” => " ",
“&szlig” => “?”,
“&iacute” => “?”,
“&reg” => " ",
“&copy” => " ",
“&aacute” => “?”,
“&Aacute” => “?”,
“&eth” => “?”,
“&ETH” => “?”,
“&Eacute” => “?”,
“&Iacute” => “?”,
“&Oacute” => “?”,
“&uacute” => “?”,
“&Uacute” => “?”,
“&THORN” => “?”,
“&thorn” => “?”,
“&Ouml” => “?”,
“&aelig” => “?”,
“&AElig” => “?”,
“&aring” => “?”,
“&Aring” => “?”,
“&oslash” => “?”,
“&Oslash” => “?”
);[/code]

Any help is appreciated.
Tim :)

It sounds like you got the script off someone else. Have you tried contacting the author of the script?
I can’t find anything in the script that would slice up the result blocks in the described manner.

Sponsor our Newsletter | Privacy Policy | Terms of Service