PDA

View Full Version : [fixed] vB 2.x & 3.x Bug: Highlight search term issues (2)


Paul
Tue 19th Aug '03, 5:20pm
Hi,

There are two issues with the highlight text system in vB 2 and 3. While both produce slightly different results, vB3 does a much better job at handling it (although obviously not perfect).

Issue 1:
The highlight words variable that displays appended to the links on the search results page does not have urlencode applied. This occurs on both vB2 and vB3.

Issue 2:
Wildcard matching is flawed, moreso in vB2. Rather than describe the problems with the regex, I'll demonstrate by example:

Post the following text:
something about reputation.
something about reputation
something about reputatasdfasdf.,mdsflkja;...
something about reputa asdfasdf.
something about reputaregex.

Search for reputa*


In vB2, only the second line is highlighted. In vB3, all but the third line are highlighted.

* should match zero characters or more
? should match a single character

Best wishes,
Paul

Mike Sullivan
Mon 10th Nov '03, 7:41pm
I think this bug just didn't get tagged as fixed; whoops! As of 2.3.2, vB2 uses vB3-style highlighting code. All 5 lines are highlighted in my tests.

It's not the code that beta 7 currently uses (to avoid highlighting HTML tags) because that requires PHP 4 and you should still be able to run vB2 on PHP 3 (not that I'd recommend it).

Additionally, the urlencode()'ing thing seems to have been fixed already.