Folks,

I am writing a plugin for internal use that access some internal data and I 
wanted to provide a `search` sub-page for that data.

So I rolled my own `\plugin\search\` url handler and it doesn't (always) work.  
On my dev setup my search has replaced the standard search and in the release 
environment the standard search appears instead.

Trac 0.12.3 (and current trunk at t.e.o) search uses the following:
{{{
    def match_request(self, req):
        return re.match(r'/search(?:/opensearch)?$', req.path_info) is not None
}}}

...which matches search at the end of any URL.

I can fix this by using a different word (`research` springs to mind) but this 
could affect other users.

Would this regex not work better: r'^/search(?:/opensearch)?$' as my 
understanding of req.path_info is that the main URL is removed before being 
passed in req?

Can anyone confirm (or deny) my understanding?  Should I raise a ticket?

Regards,

~ Mark C

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to