Description
Links in ReStructuredText are always relative to the current page.
Steps to reproduce
In a two-level deep child page (e.g. Foo/Bar), add a ReStructuredText link, e.g.
`Baz Quux <Baz/Quux>`_
This should produce a link to /Baz/Quux, but instead you get /Foo/Bar/Baz/Quux.
- Basically the same thing happens for relative URLs, only slightly funnier:
`Baz Quux </Baz/Quux>`_
This should produce a link to /Foo/Bar/Baz/Quux, but instead you get /Foo/Bar/Foo/Bar/Baz/Quux.
Workaround
Patch for parsers/text_rst.py.
--- text_rst.py.orig 2007-09-01 06:38:10.435649000 -0700 +++ text_rst.py 2007-09-01 06:38:28.701643000 -0700 @@ -383,7 +383,7 @@ if '#' in refuri: pagename, anchor = refuri.split('#', 1) page = Page(self.request, wikiutil.AbsPageName(self.request, self.formatter.page.page_name, pagename)) - node['refuri'] = page.url(self.request, anchor=anchor) + node['refuri'] = page.url(self.request, anchor=anchor, relative=False) if not page.exists(): node['classes'].append('nonexistent')
Reporter: tic (mail+moinmoin at mikael.jansson.be)
Plan
- Priority:
- Assigned to:
- Status: fixed in 1.6 and 1.7 branch