Edgewall Software
Modify

Opened 20 years ago

Closed 19 years ago

#804 closed defect (fixed)

parsing URLs with non-whitespace delimiters

Reported by: Predrag Owned by: Christian Boos
Priority: normal Milestone: 0.9
Component: wiki system Version: 0.7.1
Severity: minor Keywords: URL parsing
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

We use custom log template for our commits and items in it are separated with XML tags. Trac is incorrectly parsing URLs inside these tags.

For example <bug>http://localhost/bugzilla/show_bug.cgi?id=1284</bug> is parsed as http://localhost/bugzilla/show_bug.cgi?id=1284</bug> (note XML end tag included in URL).

Just noticed in the preview of my message that you can see this bug live in action.

Attachments (1)

804-fix.patch (1.4 KB ) - added by Christian Boos 19 years ago.
Candidate fix for this bug

Download all attachments as: .zip

Change History (7)

comment:1 by Matthew Good <matt-good.net>, 20 years ago

Component: log viewwiki
Summary: URL parsing in log messages has issuesparsing URLs with non-whitespace delimiters

Adding more descriptive summary and switching component to wiki.

Well, the issue is that Trac considers URLs to be terminated by whitespace, unless using square-brackets to escape the URL. Perhaps the parsing (regexp?) for URLs needs to only match characters that are valid within a URL rather than any non-whitespace. It would appear that MoinMoin handles this, so it may be possible to grab their matcher.

comment:2 by daniel, 20 years ago

Milestone: 0.8
Priority: normallow
Severity: normalminor

comment:3 by Jonas Borgström, 20 years ago

Milestone: 0.80.9

If I remember correctly we use this less exact regexp because it's significantly faster than the exact version. But if it's somehow possible to use an exact regexp and still get decent performance I see no reason not to.

by Christian Boos, 19 years ago

Attachment: 804-fix.patch added

Candidate fix for this bug

comment:4 by Christian Boos, 19 years ago

Owner: changed from Jonas Borgström to Christian Boos
Priority: lownormal
Status: newassigned

I attached a possible fix for this bug

comment:5 by Christopher Lenz, 19 years ago

Looks okay, I think you can check that in.

comment:6 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in r2341.

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.