[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-11-28 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=426976

Albert Astals Cid  changed:

   What|Removed |Added

   Version Fixed In|20.12.1 |20.12.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-11-27 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=426976

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In|5.20.1  |20.12.1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-11-27 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=426976

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org
   Version Fixed In||5.20.1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-11-26 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=426976

Albert Astals Cid  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/grap
   ||hics/okular/commit/239827ba
   ||ad0301d578a861be55d5711d82c
   ||c2048
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Albert Astals Cid  ---
Git commit 239827baad0301d578a861be55d5711d82cc2048 by Albert Astals Cid.
Committed on 26/11/2020 at 10:07.
Pushed by aacid into branch 'release/20.12'.

Rework how we open urls that have a #

Previously if it was a remote url that had # and a . after the # we
assumed the url had no fragment and everything was filename.

We don't do that anymore, what we do now is try to open the url as
parsed, i.e. before the # is the filename after is the fragment, and if
that fails we try to open everything as filename and nothing as
fragment.

Unfortunately given how kpart internals handle opening local vs remote
urls we need to do this in two places.

Also we have to remove the test that checked that the url was mangled at
the shell level because we don't do that anymore. Unfortunately can't
add a test for the new codepage since it would involve starting an http
server ^_^

Filenames:
  source2e.pdf
  foo#bar.pdf

What works:
 * okular http://localhost/source2e.pdf#subsection.68.3
 * okular file:///srv/http/source2e.pdf#subsection.68.3
 * okular source2e.pdf#subsection.68.3 (in the /srv/http folder)
 * okular source2e.pdf#2
 * okular http://localhost/foo#bar.pdf
 * okular file:///srv/http/foo#bar.pdf
 * okular foo#bar.pdf (in the /srv/http folder)

What doesn't work:
 * okular http://localhost/foo#bar.pdf#2

I think it's a fair limitation that if you want to open a file that contains #
in the name and also use a # page marker you need to use the encoded url like
okular http://localhost/foo%23bar.pdf#2
after all things like firefox will totally fail opening
http://localhost/foo#bar.pdf and will just work if you give the encoded url

M  +0-6autotests/shelltest.cpp
M  +22   -5part/part.cpp
M  +6-0part/part.h
M  +0-7shell/shellutils.cpp

https://invent.kde.org/graphics/okular/commit/239827baad0301d578a861be55d5711d82cc2048

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-11-21 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=426976

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #5 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/graphics/okular/-/merge_requests/321

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-10-08 Thread Albert Astals Cid
https://bugs.kde.org/show_bug.cgi?id=426976

Albert Astals Cid  changed:

   What|Removed |Added

 CC||aa...@kde.org

--- Comment #4 from Albert Astals Cid  ---
The actual fix is checking the file exists or not to be able to know if it's an
anchor or not, but that needs some rework because remote access is "slow" and
the code of the function would need to be rewritten to work asynchronously.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-10-04 Thread Mathew
https://bugs.kde.org/show_bug.cgi?id=426976

--- Comment #3 from Mathew  ---
Uh, I think so? I don't think I've ever seen epubs/odf/md that referenced using
URL anchors. Doesn't mean it can't happen, but generally since they don't get
rendered by browsers I don't think it's used much. Doesn't mean you couldn't
have a epub download URL with a `.` in the URL fragment, though.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-10-03 Thread Ahmad Samir
https://bugs.kde.org/show_bug.cgi?id=426976

--- Comment #2 from Ahmad Samir  ---
Is the anchor part of a url only relevant to pdf's? if that is the case then we
could check for the index of ".pdf" and if the # is before it, it's part of the
filename otherwise is a legit url fragment and should be kept.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 426976] Okular mangles url fragment if the it contains a '.'

2020-09-30 Thread Ahmad Samir
https://bugs.kde.org/show_bug.cgi?id=426976

Ahmad Samir  changed:

   What|Removed |Added

Summary|kioclient5 exec / kde-open5 |Okular mangles url fragment
   |with URL fragment on PDF|if the it contains a '.'

-- 
You are receiving this mail because:
You are the assignee for the bug.