Opened 4 years ago

Closed 4 years ago

#4353 closed bug (fixed)

windows installer: docs should use / in urls, not \

Reported by: claus Owned by:
Priority: normal Milestone:
Component: Documentation Version: 6.12.3
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

split up from #4292, as requested. Description there was:

Documentation cross-links are thoroughly messed up (the urls seem to be missing the package identifier): eg, the Bool in Data.List refer to libraries/Data-Bool.. instead of libraries/base-4.2.0.2%5CData-Bool..

To reproduce (in Opera 10.61):

  1. open Haskell hierarchical libraries HTML documentation (eg, via the startup menu group GHC)
  1. navigate to Data.List page
  1. scroll down to null entry
  1. click on Bool in type signature
  1. notice error message (file not found)

From looking at the directory structure, it is obvious that there should be a further indirection in the url, namely the package identifier:

base-4.3.0.0

Step 5 leaves Opera with this url

file://localhost/C:/haskell/ghc/ghc-7.0.0.20100925/doc/html/libraries/Data-Bool.html#t:Bool

instead of the correct

file://localhost/C:/haskell/ghc/ghc-7.0.0.20100925/doc/html/libraries/base-4.3.0.0/Data-Bool.html#t:Bool

On closer inspection, that id is present in the Data-List.html url, and the link to Data-Bool.html is relative, in the same package/directory.

Unfortunately, the Data-List.html url itself (from libraries/index.html), uses \ instead of the last /, which Opera encodes as %5C, which causes the relative link to Data-Bool.html to fail (missing package id, which would have been the last path component, which does not get recognized due to missing /).

Other browsers may behave differently, but my reading of rfc3986 is that \ does not separate hierarchical url components, hence there is no guarantee that relative links will work as used here (though, as so often, there is room for interpretation).

Replacing the %5C with a / and reloading Data-List.html is sufficient to make the links to Data-Bool.html et al work as expected, so the fix would be to get rid of spurious \s in hrefs in the docs, especially in libraries/index.html.

Change History (1)

comment:1 Changed 4 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Aha, thanks. Fixed in GHC 7.0 and HEAD haddock branches by:

Wed Sep 29 22:15:38 BST 2010  Ian Lynagh <igloo@earth.li>
  * Fix URL creation on Windows: Use / not \ in URLs. Fixes #4353
Note: See TracTickets for help on using tickets.