Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

url Inaccurate detection

Open liux-pro opened this issue 3 years ago • 8 comments

a xml file like this <url>https://github.com</url> open with notepad3 it show this image

i think this part (</url> ) should not be included

liux-pro avatar Dec 24 '21 18:12 liux-pro

i think this part (</url> ) should not be included

Yes, confirm </url> should not to be included (also reproducible with other "extensions"). 😬

hpwamr avatar Dec 24 '21 18:12 hpwamr

Hello @RaiKoHoff ,

Here are some examples where the link ends with a "-" and Notepad3 ignores it ? 🤔

  • https://github.com/craigo-
  • https://www.sciensano.be/en/node/66631/haufig-gestellte-fragen#wo-finde-ich-mein-zertifikat-
  • https://www.sciensano.be/nl/covid-19-test-en-herstelcertificaten/vaak-gestelde-vragen#waar-kan-ik-mijn-certificaat-vinden-
  • https://www.sciensano.be/fr/certificats-de-test-et-de-retablissement-covid-19/questions-frequemment-posees#o-puis-je-trouver-mon-certificat-

By the way in About... -> Acknowledgments: for the user "https://github.com/craigo-", I must write "https://github.com/craigo-/" to find the right site ? 🤔


Edited: to insert the answer of @RaiKoHoff to "About... -> Acknowledgments:" ("https://github.com/craigo-/")

The rendering of the hyperlinks in the About-Box is done by the RichEdit-Control (https://docs.microsoft.com/en-us/windows/win32/controls/rich-edit-controls). RichEdit's Hyperlink highlighting and enable link following in the browser is enabled by sending "EM_AUTOURLDETECT" message to the control. Its parameters (https://docs.microsoft.com/en-us/windows/win32/controls/em-autourldetect) are limited. It seems that the old RichEdit-Control does not accept a Hyperlink ending on a dash/hyphen as valid URL syntax. There is nothing I can do in this case (so we need the trick, to end the hyperlink with "/" to make the browser receive the correct string.

hpwamr avatar Dec 27 '21 15:12 hpwamr

I think this part (</url> ) should not be included

Here are some examples where the link ends with a "-" and Notepad3 ignores it ?

Hello @liux-pro , @craigo- ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.21.1228.1_beta.paf" or newer, see 1st list in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.21.1228.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Dec 28 '21 15:12 hpwamr

Notepad3 (x64) v5.21.1228.1 beta: all of @hpwamr's sample URLs are now fully recognised as valid, including the trailing dash, and go to the correct location.

Yes, I recall the acknowledgements hack to get my troublesome github profile page to render properly 😄

craigo- avatar Dec 28 '21 19:12 craigo-

Hello @RaiKoHoff ,

The end char " is selected with the URL "customUI.txt" 🤔

2022-01-03_115047

hpwamr avatar Jan 03 '22 11:01 hpwamr

The end char " is selected with the URL

Hello @RaiKoHoff , It's fixed with the "Notepad3 v5.22.103.1 beta" version ! 😃 Thanks

hpwamr avatar Jan 03 '22 15:01 hpwamr

Hello @RaiKoHoff , Sorry, but it seems to be a same issue with single-quote (') ? 🤔

  • 'https://workupload.com/'
  • 'https://workupload.com'

2022-01-03_164311

hpwamr avatar Jan 03 '22 15:01 hpwamr

Discussion: Shall single-quote (') be a valid character for URI (like it is in current implementation or not ? If not, "https://hpwamr's bazar/index" will then be shown as "https://hpwamr's bazar/index" 🤔 (First detecting if URI is quoted or not is no option, cause this will slow down URI detector maybe making it unusable). (ref.: https://www.py4u.net/discuss/290880)

Ed.: By the way: Notepad3's URI detector has to be a fast Scanner, to not slow down syntax highlighting to much. So it is and will not be an URI Validator (checking for valid URI syntax, based on it's highly complex set of rules) but only a "this looks like a hyperlink" detector/highlighter.

RaiKoHoff avatar Jan 03 '22 16:01 RaiKoHoff

Hi

I am using Notepad3 (x64) v5.21.1129.1 (ba6de2c2)

  • Compiler: MS Visual C++ 2022 v17.0.(0-1) (VC v1930)
  • OS Version: Windows 10 Version 21H2 (Build 19044)
  • Windows Colors 'Dark-Mode' Theme is SUPPORTED and SELECTED.
  • Scintilla v511
  • Lexilla v511
  • Oniguruma v7.0.0

The hyperlink hotspot is wrong - the closing tag </a> and all characters after it also appear as part of the hyperlink hotspot - until the first white space

Example 1 A) The text: Go to <a href="https://google.com/">https://google.checkpoint.com</a> B) The hyperlink hotspot: image

Example 2 A) The text: Go to <strong><a href="https://google.com/">https://google.checkpoint.com</a></strong> and then click XXX B) The hyperlink hotspot: image

Thanks

SergeiShir avatar Dec 31 '22 12:12 SergeiShir

I am using Notepad3 (x64) v5.21.1129.1

Hello @SergeiShir , You are using Notepad3 (x64) v5.21.1129.1, a version that is one year old (2021-11-29).

Below are your sentences with the latest build (2022-12-30) of Notepad3 (x64) version 5.22.1230.1 rc2 (Release Candidate 2).

2022-12-31_145225


Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.22.1230.1_rc2.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.22.1230.1_rc2_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Dec 31 '22 14:12 hpwamr

Hello @hpwamr

The latest RC2 version works excellently

Thank you!!!

SergeiShir avatar Dec 31 '22 22:12 SergeiShir