Open mbenci opened 1 month ago
,
and )
(and *
, (
, !
...) are all valid characters as soon as they don't appear in the host part.
To me quill editor works as expected when it comes to the handling of these characters:
https://google.com
(without the end slash) and then type ,
or )
: the last char won't be recognized as part of the link because it wouldn't make for a valid host in the link.https://google.com/
(this time with the end slash) and then type ,
or )
: the last char will be recognized as part of the link because it is a valid path character.Take this Google Maps position URL as an example :
https://www.google.fr/maps/place/Paris/@48.8588475,2.3058358,13z/data=!3m1!4b1!4m6!3m5!1s0x47e66e1f06e2b70f:0x40b82c3688c9460!8m2!3d48.8575475!4d2.3513765!16zL20vMDVxdGo?entry=ttu&g_ep=EgoyMDI0MTAyMi4wIKXMDSoASAFQAw%3D%3D
As you can see, they are using @
, !
or even ,
as part of the path, and IMO we should definitely be able to support that in Quill Editor
Thanks for the reply and the choice is understandable.
However, there remains a problem which in my opinion is a bug:
if I write https://www.google.it,
the ',' is part of the link (correct),
but if I delete the ',' it continues to be part of the link (wrong), same thing with other characters like '.' ')' etc
Also I think this regex covers more cases r'((http|https)://)|(www.)+[a-z0-9]+([\-\.]{1}[a-z0-9]+)([-A-Z0-9.]+)(/[-A-Z0-9+&@#/%=~_|!:,.;]*)?(\?[A-Z0-9+&@#/%=~_|!:,.;]*)?'
What do you think?
I'm working on a way to prevent events using the QuillController
and a new parameter for QuillEditorConfigurations
.
Is there an existing issue for this?
Flutter Quill version
10.8.4
Steps to reproduce
Focus the quill editor Type https://google.com/ Type , or )
Expected results
The char "," or ") "should not be part of the link.
Actual results
The char "," or ") " is part of the link and the link does not work
Additional Context
No response