I just found that if the keyword is in the URL, bolding is being applied to the URL as well as the title/description which makes the URL invalid. I am searching by keywords, and if someone searches for kayak for example, if a site www.kayakboats.com exists, the URL being returned is www.<b>kayak</b>boats.com which obviously is wrong...
Sep 14, 2000, 8:31 PM
Enthusiast (720 posts)
Sep 14, 2000, 8:31 PM
Post #2 of 6
Views: 3691
In html.pl, in sub html_record, add the following lines after my (%rec) = @_;:
$rec{'URL'} =~ s/<B>//;
$rec{'URL'} =~ s/<\/B>//;
(assuming the field name is called "URL")
- Mark
Astro-Boy!!
http://www.zip.com.au/~astroboy/
$rec{'URL'} =~ s/<B>//;
$rec{'URL'} =~ s/<\/B>//;
(assuming the field name is called "URL")
- Mark
Astro-Boy!!
http://www.zip.com.au/~astroboy/
Sep 14, 2000, 8:35 PM
Enthusiast / Moderator (885 posts)
Sep 14, 2000, 8:35 PM
Post #3 of 6
Views: 3695
I'm not absolutely certain on this, please backup your file just in case :-)
It looks like the bolding is being called in this line (about line 377) in db.cgi
($in{'ww'}) and ($tmpreg = "\\b$tmpreg\\b");
Try changing it to
($in{'ww'}) and ($tmpreg = "\\$tmpreg\\");
and see if that corrects your record display.
Mark beat me - by a long shot! Looks like his fix is a whole lot better than my suggestion too :-) Better use his.
It looks like the bolding is being called in this line (about line 377) in db.cgi
($in{'ww'}) and ($tmpreg = "\\b$tmpreg\\b");
Try changing it to
($in{'ww'}) and ($tmpreg = "\\$tmpreg\\");
and see if that corrects your record display.
Mark beat me - by a long shot! Looks like his fix is a whole lot better than my suggestion too :-) Better use his.