Bug 455806

Summary: Konsole improperly opens links with '!' at the end
Product: [Applications] konsole Reporter: sudden6 <sudden6>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: a.samirh78, yerrey
Priority: NOR    
Version: 21.12.3   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description sudden6 2022-06-22 19:43:38 UTC
SUMMARY
***
Konsole swallows trailing '!' characters from links
***


STEPS TO REPRODUCE
1. Enter "https://de.wikipedia.org/wiki/Achtung,_die_Kurve!" into a Konsole window
2. Try to follow the link by [Ctrl+Klick] ing it.


OBSERVED RESULT
The browser tries to open "https://de.wikipedia.org/wiki/Achtung,_die_Kurve" which doesn't exist

EXPECTED RESULT

The browser opens "https://de.wikipedia.org/wiki/Achtung,_die_Kurve!" which exists

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Comment 1 sudden6 2022-06-22 19:44:39 UTC
It seems this bug tracker has the same problem, so don't rely on clickable links here!
Comment 2 Yerrey Dev 2022-06-22 20:03:33 UTC
Can not reproduce with: echo 'test https://de.wikipedia.org/wiki/Achtung,_die_Kurve! test'

What is the context you're experiencing the issue in?

Konsole 22.07.70
Comment 3 sudden6 2022-06-22 20:09:54 UTC
(In reply to Yerrey Dev from comment #2)
> Can not reproduce with: echo 'test
> https://de.wikipedia.org/wiki/Achtung,_die_Kurve! test'

That does reproduce it for me, if I try to click the link I end up on the wikipedia search site.

> What is the context you're experiencing the issue in?

What do you mean by context? I had this link printed in Konsole by an application running inside Konsole, wanted to click the link as usual but ended up on an unexpected site. After looking more closely I noticed the link was not correctly transferred to my browser and also Konsole didn't highlight the last '!' character when hovering over it.

> Konsole 22.07.70

Maybe it got fixed, but the fix was not backported? Is it possible to backport the fix to the LTS series?
Comment 4 Yerrey Dev 2022-06-22 20:28:32 UTC
(In reply to sudden6 from comment #3)
> (In reply to Yerrey Dev from comment #2)
> > Can not reproduce with: echo 'test
> > https://de.wikipedia.org/wiki/Achtung,_die_Kurve! test'
> 
> That does reproduce it for me, if I try to click the link I end up on the
> wikipedia search site.

It was probably fixed in https://invent.kde.org/utilities/konsole/-/merge_requests/274/diffs, but I'm not good enough in regex to confirm if it is this specifically. But it seems to work in master.
Comment 5 Ahmad Samir 2022-06-22 21:18:00 UTC
There were recent changes in the URL parsing code in master, and it looks like this is fixed already (I tested and the url includes the trailing '!').

*** This bug has been marked as a duplicate of bug 452978 ***
Comment 6 sudden6 2022-06-23 16:10:47 UTC
(In reply to Ahmad Samir from comment #5)
> There were recent changes in the URL parsing code in master, and it looks
> like this is fixed already (I tested and the url includes the trailing '!').
> 
> *** This bug has been marked as a duplicate of bug 452978 ***

Any chance of the fix getting backported to the LTS series?
Comment 7 Ahmad Samir 2022-07-02 18:23:59 UTC
The fixes will be in 22.04.3 (which will be released this month https://community.kde.org/Schedules/KDE_Gear_22.04_Schedule).