Edgewall Software
Modify

Ticket #2718 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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

Reported by: cboos Owned by: jonas
Priority: low Milestone: 0.10
Component: search system Version: 0.9.3
Severity: trivial Keywords:
Cc:
Release Notes:
API Changes:

Description

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

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

Download all attachments as: .zip

Change History

comment:1 Changed 6 years ago by cboos

[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.

Changed 6 years ago by Andres Salomon <dilinger@…>

highlighting fix against r2944

comment:2 Changed 6 years ago by Andres Salomon <dilinger@…>

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

comment:3 Changed 6 years ago by cboos

  • Resolution set to fixed
  • Status changed from new to closed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.