Edgewall Software

Opened 16 years ago

Closed 16 years ago

#2718 closed defect (fixed)

Searching for !WikiPageNames keeps the "!" in the highlighted term

Reported by: Christian Boos Owned by: Jonas Borgström
Priority: low Milestone: 0.10
Component: search system Version: 0.9.3
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


I've just noticed a few minor issues when one wants to search for WikiPageNames like terms using the "!" prefix to disable the quickjump facility:

  1. The highlighted term will contain the "!" prefix, which usually results in nothing being highlighted.
  2. On the opposite, the next pages links don't contain the "!" prefix anymore, resulting in a quickjump when trying to browse subsequent result pages.

Example: search:!TicketQuery (the expected result would be the same as when using search:" TicketQuery").

Attachments (1)

trac-searchwikipage-r2944.patch (917 bytes ) - added by Andres Salomon <dilinger@…> 16 years ago.
highlighting fix against r2944

Download all attachments as: .zip

Change History (4)

comment:1 by Christian Boos, 16 years ago

[2910] fixed point 2.

Point 1. can be fixed by:

  • trac.js

    4141      var param = params[p].split('=');
    4242      if (param.length < 2) continue;
    4343      if (param[0] == 'q' || param[0] == 'p') { // q= for Google, p= for Yahoo
    44         return unescape(param[1].replace(/\+/g, ' ')).split(/\s+/);
     44        var searchwords=unescape(param[1]);
     45        if (searchwords[0] == '!') searchwords = searchwords.slice(1);
     46        return searchwords.replace(/\+/g, ' ').split(/\s+/);
    4547      }
    4648    }
    4749    return [];

As this conflicts with the patches on #2759, I'll postpone this until one of those patches are committed.

by Andres Salomon <dilinger@…>, 16 years ago

highlighting fix against r2944

comment:2 by Andres Salomon <dilinger@…>, 16 years ago

The patch I just attached is cboos's original patch updated for trunk, now that #2759 has been fixed there.

comment:3 by Christian Boos, 16 years ago

Resolution: fixed
Status: newclosed

Thanks for the update. I've checked that in (r2975).

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.