manual: Relative links from wiki broken in FreedomBox's online help
Freedombox handles relative links starting with a slash wrong:
- MediaWiki renders the links untouchend into HTML so the browser uses the wiki's URL as base to resolve the destination. In the case of Debian's wiki a /relative/path renders to <a href="/relative/path"> and resolves to https://wiki.debian.org/relative/path
- But FreedomBox cannot just leave them as they are, because the base URL is not the site's root and because relative links might point to wiki pages within the Debian's wiki but outside FreedomBox's manual. Thus FreedomBox tries to correct the relative URL's sending them back to Debian's wiki, using the URL of the current page's equivalent in the wiki as base to the relative link and renders the full URL into the web's HTML like this: <a href="https://wiki.debian.org/FreedomBox/Manua/App/relative/path" >. This is correct for relative URLs not starting with slash.
But it (1) pushes the user's navigation unnecessarily out of the FreedomBox and (2) handles the trailing slash as yet another character ignoring the fact that such relative links point at the site base. This behaviour is wrong and causes broken links. For instance:
- In Deluge's description page there's a link to Transmission's description page that renders a link to https://wiki.debian.org/FreedomBox/Manual/Deluge/FreedomBox/Manual/Transmission#, which doesn't exist as such.
- If the Firefall's description page there's a link to the Netwoks section that renders a link to https://wiki.debian.org/FreedomBox/Manual/Firewall/FreedomBox/Manual/Networks#, which doesn't exist as such.
- etc
FreedomBox's should render its online help...
- taking the trailing slashes into account pointing to Debian's wiki root.
- shortcutting the manual's pages to the local copy, if existing.
Edited by Fioddor Superconcentrado