Red Hat Bugzilla – Bug 74812
rpm2html should avoid repeating the slashes.
Last modified: 2007-04-18 12:46:58 EDT
rpm2html is certain cases crates relative links that contain double-slash. In
some cases thios is annoying and in some cases it makes things not work.
- use "url=/" in your rpm2htmlrc
Result: almost all the links are written as
href="//...". Mozilla gets really unhappy, for it "//a/b..." = "http://a/b...",
while waht we really wanted was an "http://same_host/a/b". Some links will be
wirtten with even 3 slashes (for example, the links to individual packages in
- use "url=" (e.g.empty) in your rpm2htmlrc
Pretty counterintuitive, but seems to work.
rpm2html whould either complain, or work correctly when "url" (and other similar
variables) ends with a slash.
the pages generated are not supposed to be loaded directly.
In that case use href="file:///"
I take patches, the // problem seems to only be a real one
if you use it as the start of the URL and the right way to
build such URLs is to use file:/// (see RFC 2396 and Co.),
but if you really think it's a problem well point me at the
set of places where you think it should be fixed.
> the pages generated are not supposed to be loaded directly.
Where did I say anything about loading directly??? The real URL is
"http://rpm.nogin.org/", and it is generated correctly using the line
in the config file. But when I tried using
it did not work (see original report).
> if you really think it's a problem well point me at the
> set of places where you think it should be fixed
Whatever parses the config file should drop check whether the "url" variable
both starts and end with a '/'. If so, the '/' at the end should be dropped.
> the // problem seems to only be a real one
> if you use it as the start of the URL
It's a big problem with "url=/". It's a smaller problem with "url=/.../" - there
everything would work, but since some links would have double slashes in them
and some would be correct, you would have issues with things like "visited"
status of the URLs, etc.
rpm2html is not part of the distro for quite some time, this won't get