Modify

Opened 9 years ago

Closed 6 years ago

#4037 closed defect (fixed)

Default configuration for "paths" configuration seems unintended

Reported by: Matthijs Kooijman Owned by: Steffen Hoffmann
Priority: normal Component: BreadCrumbsNavPlugin
Severity: normal Keywords: regexp
Cc: Trac Release: 0.11

Description

The default value for the "paths" configuration is "/wiki*,/ticket*,/milestone". According to the code, each of the elements in this list is interpreted as a regex and passed to re.match.

From looking at this, it looks like the * should match anything, so /wiki* should match anything starting with wiki. However, this is a regex, so it should be /wiki.* Now, the * only serves to make the i preceding it optional: /wiki* matches /wik, /wikfoo, /wikiiiiii, etc.

Furthermore, the re.match function already handles the "starts with" part, so just "/wiki" should be enough.

Lastly, I would expect the / after wiki to be included. Currently, /wikifoo would also match, while you would want to limit to /wiki/foo.

I propose changing the default value of "paths" to "/wiki/,/ticket/,/milestone/". Would that make sense?

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by peterA

I agree. The proposal works fine for me.

comment:2 Changed 6 years ago by Steffen Hoffmann

Keywords: regexp added
Owner: changed from Stephen Hansen to Steffen Hoffmann
Status: newassigned

This has been merged with the source here locally.

Will take care, as soon as I get access to the repository.

comment:3 Changed 6 years ago by Steffen Hoffmann

(In [10891]) BreadCrumbsNavPlugin: Improve default configuration for 'supported_paths' ListOption, refs #4037.

Thanks to matthijs for a very detailed, educating report.

comment:4 Changed 6 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [10896]) BreadCrumbsNavPlugin: Tag long overdue maintenance release 0.2, closes #2463, #3965, #4037, #4411, #7036 and #7231.

Fix erroneously introduced version mismatch between changelog and setup.py.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.