Edgewall Software
Modify

Opened 18 years ago

Closed 14 years ago

Last modified 14 years ago

#4542 closed defect (fixed)

Inconsistent treatment of underscores in Wiki Page Names

Reported by: Dave Matthews Owned by: Christian Boos
Priority: normal Milestone: 0.12.1
Component: wiki system Version: 0.10.3
Severity: normal Keywords: wikipagenames
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

With Trac 0.8 there was a problem that _FooBar got treated as a wiki page name (see #957, #1317). This got fixed in 0.9. However, there seems to have been a further change in 0.10 such that FooBar_ now matches when it, presumably, shouldn't?

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 18 years ago

Keywords: wikipagenames added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos

Probably it shouldn't.

What about this change?

  • trac/wiki/api.py

     
    284289            (upper, lower, upper, lower, lower) +
    285290            r"(?:@\d+)?" # optional version
    286291            r"(?:#%s)?" % self.XML_NAME + # optional fragment id
    287             r"(?=:(?:\Z|\s)|[^:a-zA-Z]|\s|\Z)" # what should follow it
     292            r"(?=:(?:\Z|\s)|[^:\w]|\s|\Z)" # what should follow it
    288293            )
    289294
    290295        def check_unicode_camelcase(pagename):

This would prevent FooBar3 to be recognized as a WikiPageName as well.

comment:2 by Christian Boos, 15 years ago

Milestone: next-minor-0.12.x
Resolution: worksforme
Status: newclosed

FooBar_ is not part of the valid WikiPageNames anymore, so this must have been fixed at some point.

comment:3 by David Matthews, 14 years ago

Resolution: worksforme
Status: closedreopened

For some reason, this problem seems to have come back again. The following both show up as page links although I don't think they should: FooBar3, FooBar_

comment:4 by Christian Boos, 14 years ago

Milestone: 0.12.1

Thanks for letting us know!

comment:5 by Christian Boos, 14 years ago

Resolution: fixed
Status: reopenedclosed

So initially r4126 broke it… and it seems it never worked since so I wonder what I tested in comment:2

Fixed for real now by r9984.

comment:6 by David Matthews, 14 years ago

Great - yet another reason for us to upgrade to Trac 0.12!

Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.