https://bugs.kde.org/show_bug.cgi?id=496817

            Bug ID: 496817
           Summary: Open Links plugin should stop at closing parenthesis
    Classification: Applications
           Product: kate
           Version: 24.08.3
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: groszdaniel...@gmail.com
  Target Milestone: ---

SUMMARY
Minor suggestion: The Open Links plugin considers many whitespace and
punctuation characters to terminate a link, but not a closing parenthesis, so
if a link is parenthesised, or it's in a markdown document, where the URL of a
link is in parentheses, the closing parenthesis is included in the URL. While a
")" can technically be part of the path in a URL, it's much more likely to be
not intended to be part of the URL, so the URL recognition should stop before
it.

I'm not sure there's other punctuation that should be added to the list of
characters that terminate a URL. Perhaps stop before a ".", ":" or "?" if they
are followed by whitespace (or the end of the document); conversely, only stop
before a ";" if followed by whitespace (currently that delimits a URL, but
while uncommon, it can be used as a separator within URLs equivalent to "&").

STEPS TO REPRODUCE
1. Enter this: (https://example.com/)

OBSERVED RESULT
The closing ")" is underlined, and https://example.com/) is opened in the
browser. 
(Moreover, if the URL is entered without the trailing "/", it's opened as
http://https//example.com) , at least in Firefox.)

EXPECTED RESULT
Only https://example.com/ is underlined and opened.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241126
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.7-1-default (64-bit)
Graphics Platform: X11

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to