Modify ↓
Opened 15 years ago
Closed 8 years ago
#6009 closed defect (fixed)
[Patch] fix link to source if wiki page name contains /
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | IncludeSourcePartialPlugin |
Severity: | normal | Keywords: | |
Cc: | Massimo | Trac Release: | 0.11 |
Description
If the wiki page name contains one or more / , then relative url generated in includeSource pointing to the source code does not work anymore. Using the formatter is the preferred way to generate links in trac anyway. Please find a patch attached.
Attachments (2)
Change History (8)
Changed 15 years ago by
Attachment: | fix-browser-url.diff added |
---|
Changed 15 years ago by
Attachment: | fix-browser-url.2.diff added |
---|
Use trac url formatter to generate link to source.
comment:1 Changed 15 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|---|
Summary: | fix link to source if wiki page name contains / → [Patch] fix link to source if wiki page name contains / |
comment:2 Changed 8 years ago by
Cc: | Massimo added; Ryan J Ollos removed |
---|---|
Owner: | changed from Chris Heller to Ryan J Ollos |
Status: | new → accepted |
comment:3 follow-up: 5 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
In 15745:
comment:4 Changed 8 years ago by
Owner: | changed from Ryan J Ollos to ichael-dev@… |
---|
comment:5 Changed 8 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to rjollos:
In 15745:
There is an error in this fix line 124, rev
must be provided as rev=rev
otherwise the generated browser link is incorrect (the revision number is appended to the URL instead of being passed as a parameter)
-
includesource/IncludeSource.py
a b class IncludeSourceMacro(WikiMacroBase): 121 121 if kwargs.has_key('header'): 122 122 header = kwargs.get('header') # user specified header 123 123 else: 124 header = tag.a(file_name, href=href.browser(orig_file_name, rev ))124 header = tag.a(file_name, href=href.browser(orig_file_name, rev=rev)) 125 125 if not header: 126 126 header = u'\xa0' # default value from trac.mimeview.api.py 127 127
Note: See
TracTickets for help on using
tickets.
Use trac url formatter to generate link to source.