Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 92335 - htmlview can't open files with names which include spaces
htmlview can't open files with names which include spaces
Product: Fedora
Classification: Fedora
Component: htmlview (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Warren Togami
Depends On:
Blocks: CambridgeTarget
  Show dependency treegraph
Reported: 2003-06-05 04:46 EDT by Moritz Barsnick
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-25 00:53:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to allow htmlview to handle file names with whitespace (834 bytes, patch)
2004-11-01 09:37 EST, Moritz Barsnick
no flags Details | Diff

  None (edit)
Description Moritz Barsnick 2003-06-05 04:46:21 EDT
Description of problem:
htmlview fails to open files with names which have spaces or special chars. 
File names with spaces are passed as separated arguments.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. htmlview "/path/to/file name with spaces.html" (or any proper quoting)
Actual results:
File is not displayed, because the called viewer sees "htmlview /path/to/file"

Expected results:
File is displayed.

Additional info:
This is very obviously the classic $* vs. "$@". "$@" ist the correct way to 
pass "all arguments". There are three "exec" calls where this needs to be 
fixed. I can provide a patch, but I guess you won't need it.  ;-)  Just be sure 
to use "$@" _with_ the double quotes!
Comment 1 Moritz Barsnick 2004-11-01 09:37:21 EST
Created attachment 106013 [details]
patch to allow htmlview to handle file names with whitespace

Still the same problem 17 months later in version 3.0.0-8. Here's a patch.

If you really don't want to allow multiple file names to be passed, try "$1".
OTOH "$*" will fail when getting multiple files and one of them contains spaces
(but I haven't checked whether the script passes this kind of arg to this
Comment 2 Warren Togami 2004-11-06 17:17:37 EST
warren@redhat.com is NOT my address.
Comment 3 Warren Togami 2005-04-25 00:53:03 EDT

Note You need to log in before you can comment on or make changes to this bug.