xdg-open of a file-scheme URL containing blanks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
leo-editor |
Fix Released
|
Low
|
Edward K. Ream |
Bug Description
The major problem is that currently blanks are not allowed in file-scheme URL's.
The minor problem is that error messages are printed on the console.
When an attempt is made to open a file-scheme URL that contains blanks (making it an invalid URL), an error message like the following is printed on the console:
xdg-open: unexpected argument 'Dodge'
Try 'xdg-open --help' for more information.
--- Error message end ----
The URL that caused the above message:
file://
Fix to both problems:
Either single or double quotations are needed around the pathname that is passed to xdg-open.
Test System:
Ubuntu 11.10 with Fluxbox window manager
Leo Log Window
Leo 4.9.1 devel, build 5106, 2012-03-09 19:20:49
Python 2.7.2, qt version 4.7.3
linux2
setting leoID from os.getenv('USER'): 'bob'
load dir: /home/bob/
global config dir: /home/bob/
home dir: /home/bob
reading settings in /home/bob/
reading settings in /home/bob/
reading settings in /media/
Changed in leo-editor: | |
milestone: | none → 4.10-b1 |
importance: | Undecided → Low |
assignee: | nobody → Edward K. Ream (edreamleo) |
Ideally, Leo-Editor would require a valid URL in this case. That is, a URL with the blanks escaped as specified by the URL standard. This requires Leo-Editor to remove the HTML escapes and enclose the pathname in quotations before passing it to xdg-open.
I believe the library function urllib. unquote( string) will put the blanks back.