Bug 473285

Summary: Final stop interpreted as part of URL
Product: [Applications] konsole Reporter: Alexander Potashev <aspotashev>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: fanzhuyifan
Priority: NOR    
Version: 22.12.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alexander Potashev 2023-08-11 14:50:11 UTC
SUMMARY
Final stop interpreted as part of URL.

STEPS TO REPRODUCE
1. Have a CLI tool print the a URL and a dot at the end. For example: "For help, see https://github.com/martinvonz/jj/blob/main/docs/config.md." (comes from https://github.com/martinvonz/jj/blob/main/cli/src/cli_util.rs#L2557 )
2. Ctrl+click on the URL in Konsole or Yakuake.

OBSERVED RESULT
The following string is interpreted as URL: "https://github.com/martinvonz/jj/blob/main/docs/config.md."

EXPECTED RESULT
The following string interpreted as URL: "https://github.com/martinvonz/jj/blob/main/docs/config.md"

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version:  5.107.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-12-01 07:33:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/934
Comment 2 Méven 2024-07-22 19:55:50 UTC
Git commit 02ba8cefc763f841e523c77069860253599b2dc0 by Méven Car, on behalf of Wendi Gan.
Committed on 22/07/2024 at 12:05.
Pushed by meven into branch 'master'.

url filter: remove trailing non-URL characters

Adjusted UrlFilter::newHotSpot to strip non-URL trailing characters (e.g., commas, dots) using regex "[',.:;]+$". This ensures correct URL parsing without trailing punctuation.

Test case: 'https://example.com.' should exclude the trailing dot.
Related: bug 472274

M  +16   -10   src/filterHotSpots/UrlFilter.cpp

https://invent.kde.org/utilities/konsole/-/commit/02ba8cefc763f841e523c77069860253599b2dc0