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)
Change History (7)
comment:1 by , 20 years ago
Component: | log view → wiki |
---|---|
Summary: | URL parsing in log messages has issues → parsing URLs with non-whitespace delimiters |
comment:2 by , 20 years ago
Milestone: | → 0.8 |
---|---|
Priority: | normal → low |
Severity: | normal → minor |
comment:3 by , 20 years ago
Milestone: | 0.8 → 0.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.
comment:4 by , 19 years ago
Owner: | changed from | to
---|---|
Priority: | low → normal |
Status: | new → assigned |
I attached a possible fix for this bug
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.