After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327874 - Slightly better URL parsing in text msgs
Slightly better URL parsing in text msgs
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Parsing
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtkhtml-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-01-20 15:15 UTC by Bastien Nocera
Modified: 2006-07-31 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkhtml3-try-match-url-garbage-2.patch (1.78 KB, patch)
2006-01-20 15:21 UTC, Bastien Nocera
rejected Details | Review
gtkhtml3-try-match-url-garbage-3.patch (1.08 KB, patch)
2006-02-28 16:27 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2006-01-20 15:15:02 UTC
Consider the portion of mail:
 <http://mysystem/MSDOS/'SHARED.PZ00.PROD.SUPERBATCH.ZIPLIB(Z00055R)'>

The URL is actually:
http://mysystem/MSDOS/'SHARED.PZ00.PROD.SUPERBATCH.ZIPLIB(Z00055R)'
But Evolution only highlights:
http://mysystem/MSDOS/'SHARED.PZ00.PROD.SUPERBATCH.ZIPLIB(Z00055R

 From RFC 1738:
  Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
  reserved characters used for their reserved purposes may be used
  unencoded within a URL.

The attached patch will rewind only if the character doesn't have a matching one in the URL.
Comment 1 Bastien Nocera 2006-01-20 15:21:50 UTC
Created attachment 57736 [details] [review]
gtkhtml3-try-match-url-garbage-2.patch
Comment 2 Bastien Nocera 2006-02-28 16:06:33 UTC
Wasn't tested, and the code changes should actually be in src/htmltext.c in the regexps in HTMLMagicInsertMatch.
Comment 3 Bastien Nocera 2006-02-28 16:27:43 UTC
Created attachment 60326 [details] [review]
gtkhtml3-try-match-url-garbage-3.patch

' is an allowed character in a URL, so let's allow it in the regexp
Comment 4 Bastien Nocera 2006-04-25 14:19:54 UTC
Patch was verified for e-mail creation, but it's not enough for e-mail reading.
Comment 5 Harish Krishnaswamy 2006-06-12 13:04:24 UTC
Bastien : are you working on this patch for e-mail reading too ? anyone else ?
Comment 6 Bastien Nocera 2006-06-12 14:04:12 UTC
This patch can already be committed.

This is the original bug report:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=189879

Matthew Barnes is supposed to be working on the second part of the patch.
Comment 7 Veerapuram Varadhan 2006-07-31 15:15:41 UTC
(In reply to comment #3)
> Created an attachment (id=60326) [edit]
> gtkhtml3-try-match-url-garbage-3.patch
> 
> ' is an allowed character in a URL, so let's allow it in the regexp
> 
Looks good to commit.  Please commit with a ChangeLog.
Comment 8 Bastien Nocera 2006-07-31 15:28:39 UTC
Committed to gnome-2-14 and HEAD

2006-07-31  Bastien Nocera  <hadess@hadess.net>

        reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>

        * htmltext.c: Add "'" (single quote) as a possible character in
        a URL

        Fixes bug #327874