Bug 519008 - okular cannot handle escaped URL correctly
Summary: okular cannot handle escaped URL correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kdegraphics
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ngo Than
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 521170 (view as bug list)
Depends On:
Blocks: 521170
TreeView+ depends on / blocked
 
Reported: 2009-08-24 15:08 UTC by Mary Ellen Foster
Modified: 2009-11-28 10:19 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-07 02:08:08 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
KDE Software Compilation 207461 None None None Never

Description Mary Ellen Foster 2009-08-24 15:08:17 UTC
Description of problem:
I run a mainly KDE-based system, but my primary web viewer is Firefox -- I'm not sure where the default applications come from in this case, so I'm filing the bug against Firefox but it could be wrong.

If I open a PDF file with spaces in the file name through Firefox, it downloads successfully, but Okular claims not to be able to open it. This seems to be because the file has a name like "file with spaces.pdf", but Okular wants to open "file%20with%20spaces.pdf". Here's a 100% reproduceable test case:
    http://homepages.inf.ed.ac.uk/mef/file%20with%20spaces.pdf

Version-Release number of selected component (if applicable):
firefox-3.5.2-2.fc11.x86_64

How reproducible:
Every time


Steps to Reproduce:
1. Open the above URL and choose to view in Okular (if that's not the default already)
  
Actual results:
"Could not open file:///tmp/file%20with%20spaces.pdf" (but "/tmp/file with spaces.pdf" does exist)

Expected results:
Viewing the file

Comment 1 Mamoru TASAKA 2009-09-06 04:00:54 UTC
I guess okular should be fixed, not firefox.

The trouble is that okular cannot handle escaped URL correctly.
For example:
- Create a pdf file named "name with space.pdf"
- Try the following command:
  $ okular "file:///$(pwd)/$(echo "name with space.pdf" | sed -e 's| |%20|g')"
Then okular cannot open this pdf file, while "evince" can handle
escaped URL (and also non-escaped URL).

Note that
  $ okular "file:///$(pwd)/$(echo "name with space.pdf")"
suceeds

Once changing the component to kdegraphics.

Comment 2 Mamoru TASAKA 2009-09-06 04:05:47 UTC
This issue affects opening PDF file with okular from pcmanfm
(bug 521170)

Comment 3 Kevin Kofler 2009-09-06 13:19:39 UTC
Looks like the wrong method of KUrl or QUrl is being used (the method which just throws away the file:// instead of the one which converts to a file name properly).

Comment 4 Mamoru TASAKA 2009-09-06 13:33:56 UTC
A small modification

(In reply to comment #1)
> while "evince" can handle
> escaped URL (and also non-escaped URL).

In fact in some cases evince cannot handle "non-escaped" URL
"as expected".
For example if the file name is "name_with_%20.pdf",

$ evince file://$(pwd)/name_with_%2520.pdf
works, $ evince file://$(pwd)/name_with_%20.pdf won't work.

okular behaves reversely.

Comment 5 Steven M. Parrish 2009-09-13 01:34:08 UTC
Thank you for taking the time to report this issue.

This is an issue that needs to be addressed by the upstream developers. Please report this at http://bugs.kde.org and then add the upstream report information to this report.  We will monitor the upstream report for a resolution to this issue, and will review any bug fixes that become available for consideration in future updates.

Setting status to NEEDINFO, and awaiting upstream bug report URL for tracking.

Thanks in advance.

-- 
Steven M. Parrish - KDE Triage Master
                  - PackageKit Triager
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 6 Mary Ellen Foster 2009-09-15 13:20:12 UTC
Upstream bug filed.

Comment 7 Ian Pilcher 2009-10-04 17:14:19 UTC
Does anyone in Fedora-land have the ability to prod the Okular developers to
actually do something about this?  The upstream bug appears to be going
absolutely nowhere.

Comment 8 Sebastian Krämer 2009-10-13 14:01:30 UTC
It's claimed to be fixed but probably folks have to wait until a new version is officially released..?

Comment 9 Rex Dieter 2009-10-13 14:20:47 UTC
Upstream patch is integrated into our packaging,

%changelog
* Thu Oct 08 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.2-3
- okular does not handle escaped URL correctly (kde#207461)

Comment 10 Kevin Kofler 2009-10-13 14:21:45 UTC
kdegraphics-4.3.2-3.{fc10,fc11,fc12,fc13} has the fix, so it's fixed in our KDE 4.3.2 update which is coming soon. (If you used vanilla upstream KDE, you'd get the fix only in 4.3.3.)

Comment 11 Sebastian Krämer 2009-10-13 14:25:42 UTC
Great, thanks for the note.

Comment 12 Ben Boeckel 2009-11-07 02:08:08 UTC
Closing bug since 4.3.2. is stable.

Comment 13 Mamoru TASAKA 2009-11-28 10:19:30 UTC
*** Bug 521170 has been marked as a duplicate of this bug. ***


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