#4353: windows installer: docs should use / in urls, not \
---------------------------------+------------------------------------------
    Reporter:  claus             |       Owner:               
        Type:  bug               |      Status:  new          
    Priority:  normal            |   Component:  Documentation
     Version:  6.12.3            |    Keywords:               
    Testcase:                    |   Blockedby:               
          Os:  Windows           |    Blocking:               
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown 
---------------------------------+------------------------------------------
 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)

 2. navigate to `Data.List` page

 3. scroll down to `null` entry

 4. click on `Bool` in type signature

 5. 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`.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4353>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to