GNOME Bugzilla – Bug 570898
incomplete email address/mailto url matching
Last modified: 2021-06-10 19:53:38 UTC
Please describe the problem:
None of the following addresses which are all valid and can be found in RFC 3696, section 4.3, are recognized properly (recognized part inside parenthesis).
Moreover, even if the addresses would be recognized, opening one of them would cause g-t to prefix it with "mailto:" instead of prefixing it AND encoding it.
Steps to reproduce:
Does this happen every time?
And we see that Bugzilla is not perfect either, but does a slightly better job.
One if these days, the URL matcher in gnome-terminal is going to be come self-aware and we'll all be done for :/
Created attachment 128236 [details] [review]
I took the RFC3986 which contains the generic URI grammar and implemented it (I didn't find such a regex in GNOME libraries). It is a bit larger than it was before, but no one will complain about an URL not being recognized. I think g-t shouldn't care about the kind of URL (http, h323, mailto, or whatever), it should just propose to open/copy them with GNOME which will handle it the way it is configured for.
Beside this, I took the RFC3696 and implemented something for email addresses.
For now, all of the above mailto URL's and addresses are properly recognized.
And BTW, it fixes #448044 and #546628.
Created attachment 128258 [details] [review]
regexes reimplementation (slightly improved)
* slightly improved performance regarding last version
* useless rules commented
* regressions fixed regarding www addresses
Comment on attachment 128236 [details] [review]
What was the point of switching from g_strdup_printf() to g_string_new + g_string_append ?
Apart from that, looks good.
All fixed by the regex rewrite from bug 756038.
Reopening, the big regex rewrite did _not_ fix these special cases mentioned in comment 0.
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/6784.