Red Hat Bugzilla – Bug 503047
Missing quoting in mimic_gnome_open
Last modified: 2018-04-11 04:45:14 EDT
Description of problem:
$ su -
# xdg-open 'http://foo/bar baz'
/usr/bin/htmlview: line 75: [: http://foo/bar: binary operator expected
Version-Release number of selected component (if applicable):
Space is not allowed as part of URL, so we shouldn't protect it. When the space character is properly encoded (as %20), the script works as expected.
I'm fairly certain we should handle this and the bug is not actually invalid. However, it's not clear what the desired behaviour is.
Among other things, RFC 3986 says
For robustness, software that accepts user-typed URI should attempt
to recognize and strip both delimiters and embedded whitespace.
Based on other reading of RFC 3986 and referencing RFC 2396 as well, I can see valid behaviour being either of the following:
* Treat the whitespace as delimiter, and recognize input as an attempt to load
BOTH 'http://foo/bar' AND 'baz' (in separate tabs/windows/processes)
However, since xdg-open only supports one URI at a time, we would actually
only attempt to load 'http://foo/bar'
* Treat the whitespace as an embedded character and encode it, so we load
I think the first behaviour is arguably "more correct" per the spec, but perhaps less intuitive to a user.
As naive user I would expect xdg-open to take whatever I write, determine the right opener, and pass exactly what I wrote through to it. Some openers might support spaces, some doesn't, but I don't expect xdg-open to do anything regarding that. Also no percent-encoding.
That is also how it works when gnome is available, but not in a limited environment as the one provided by "su -".
It would be fine if xdg-open could open multiple files/urls if it is handed multiple argv's. But it would be surprising and annoying if it parsed and splitted an argument.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
Same problem with htmlview-4.0.0-6.fc12.noarch
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '12'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 12's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 12 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Seems to be solved in f14