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 331813 - SIP/H.323 Addresses
SIP/H.323 Addresses
Status: RESOLVED FIXED
Product: GtkHtml
Classification: Other
Component: Rendering
3.9.x
Other Linux
: High minor
: 2.9
Assigned To: gtkhtml-maintainers
Evolution QA team
: 242936 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-19 21:13 UTC by Damien Sandras
Modified: 2007-04-20 04:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkhtml-3.12.2-sip-magiclink.diff (1.02 KB, patch)
2007-01-14 16:56 UTC, Gilles Dartiguelongue
none Details | Review
gtkhtml-3.12.2-magiclinks.diff (1.26 KB, patch)
2007-01-14 22:48 UTC, Gilles Dartiguelongue
none Details | Review
gtkhtml-3.12.2-magiclinks.diff (1.27 KB, patch)
2007-01-14 22:56 UTC, Gilles Dartiguelongue
accepted-commit_now Details | Review
gtkhtml-3.13.6-sip.h323.callto-hyperlinks.patch (2.58 KB, patch)
2007-02-12 10:34 UTC, Gilles Dartiguelongue
committed Details | Review
evolution-HEAD-hyperlinks-unification.patch (1.63 KB, patch)
2007-02-12 10:36 UTC, Gilles Dartiguelongue
none Details | Review
evolution-data-server-1.9.91-hyperlinks.patch (1.43 KB, patch)
2007-02-13 23:32 UTC, Gilles Dartiguelongue
committed Details | Review
gtkhtml-3.14-url-separation.patch (1.76 KB, patch)
2007-04-09 20:36 UTC, Gilles Dartiguelongue
committed Details | Review

Description Damien Sandras 2006-02-19 21:13:34 UTC
Evolution should highlight sip/h323 URLs and allow them to be clickable.
Comment 1 Karsten Bräckelmann 2006-02-19 21:22:17 UTC
Agreed. :)

Confirming. This is GtkHTML, Rendering.
Comment 2 André Klapper 2006-03-25 02:26:00 UTC
guess first step is to add it to "static HTMLMagicInsertMatch mim []" in gtkhtml/src/htmltext.c.
Comment 3 André Klapper 2006-03-25 13:23:23 UTC
let's integrate with gnome.
Comment 4 Karsten Bräckelmann 2006-03-29 19:21:25 UTC
See also bug 265254.
Comment 5 Gilles Dartiguelongue 2007-01-14 16:56:04 UTC
Created attachment 80247 [details] [review]
gtkhtml-3.12.2-sip-magiclink.diff

this is a patch against gtkhtml-3.12.2 which allows gtkhtml to render sip links. Tested with evolution-2.8/gnome-2.16.

I didn't add h323, because I'm not sure of the forms allowed for the URL.

The other fix is changing nttp to nntp (I'm pretty sure this was a mistake in the first place).
Comment 6 Damien Sandras 2007-01-14 21:15:34 UTC
h323 could be of the following forms :

h323:something
h323:something@host
h323:@host
h323:host
h323:something@host:port
h323:@host:port
h323:host:port

Comment 7 Gilles Dartiguelongue 2007-01-14 21:41:01 UTC
could the address be of the form :

h323:([0-9]{1,3}\.){3}[0-9]{1,3} (meaning ip address)

because I remember using it on a lan (but maybe I'm wrong).
Comment 8 Damien Sandras 2007-01-14 21:49:26 UTC
yes : host can be an IP Address or an hostname, just like for SIP (but it is unusual).
Comment 9 Gilles Dartiguelongue 2007-01-14 22:48:16 UTC
Created attachment 80276 [details] [review]
gtkhtml-3.12.2-magiclinks.diff

This one should be ok. Here is the explanation of the regex :

"sip:(
([0-9]{1,3}\.){3}[0-9]{1,3} // ip address
|                    // or
[-_a-z0-9.'\\+]+     // user or host or something
(@[-_a-z0-9.%=?]+)?  // @host (eventually optional)
)
(:[0-9]{1,5})?       // optional port number
"

and same thing for h323 according to damien's comment.
Comment 10 Gilles Dartiguelongue 2007-01-14 22:56:09 UTC
Created attachment 80278 [details] [review]
gtkhtml-3.12.2-magiclinks.diff

hum, no not right !

"sip:
  ([-_a-z0-9.'\\+]+)?                // optional user
  (
    @([-_a-z0-9.%=?]+                // optional hostname
    |([0-9]{1,3}\.){3}[0-9]{1,3})?   // or optional IP
  )?
  (:[0-9]{1,5})?"                    // optional port number

This sounds better but could lead to "sip:" being a link by itself. Comments ?
Comment 11 Kjartan Maraas 2007-01-25 15:51:21 UTC
Please someone review this patch.
Comment 12 Srinivasa Ragavan 2007-01-28 18:26:54 UTC
Looks fine. Please commit.
Comment 13 Kjartan Maraas 2007-01-29 10:10:52 UTC
Commited on both branches.
Comment 14 Kjartan Maraas 2007-01-29 13:42:11 UTC
Reopening to get comments on these warnings:

htmltext.c:2969:61: warning: Unknown escape '.'
htmltext.c:2970:60: warning: Unknown escape '.'

Could we get those fixed too?
Comment 15 Gilles Dartiguelongue 2007-01-29 14:58:14 UTC
looks like espacing . in ([0-9]{1,3}\.) is not necessary, sorry about that
Comment 16 Kjartan Maraas 2007-01-30 21:17:14 UTC
Fixed. Thanks.
Comment 17 Gilles Dartiguelongue 2007-02-04 18:22:54 UTC
Seems like the . was removed in svn. This is wrong since it is the ip address separator. The correct version of the expresion in comment #15 is ([0-9]{1,3}.)
Comment 18 Gilles Dartiguelongue 2007-02-12 10:34:31 UTC
Created attachment 82376 [details] [review]
gtkhtml-3.13.6-sip.h323.callto-hyperlinks.patch

after messing more with gtkhtml/evolution, I found that preceding patch is good but not enough to be homogeneous throughout evo UI. Here is a revisited patch that fixes this bug and the bug for callto URIs in gtkhtml part.
Comment 19 Gilles Dartiguelongue 2007-02-12 10:36:40 UTC
Created attachment 82377 [details] [review]
evolution-HEAD-hyperlinks-unification.patch

Here is the evolution part. It should unify display in mail views and in mail editor. Note that I couldn't test it yet so I'm not sure about the espacing in this patch. I'm just posting those in the hope that someone can test/validate those before next tarball release.
Comment 20 Karsten Bräckelmann 2007-02-12 19:26:15 UTC
REOPENing according to comment 17.
Comment 21 Karsten Bräckelmann 2007-02-12 19:28:43 UTC
*** Bug 242936 has been marked as a duplicate of this bug. ***
Comment 22 Gilles Dartiguelongue 2007-02-13 19:54:43 UTC
ok, evolution part is not yet enough to get the mail view to show up properly (altought there is a little typo in the patch).  Any hint on the direction to look at would be appreciated.
Comment 23 Gilles Dartiguelongue 2007-02-13 23:32:37 UTC
Created attachment 82497 [details] [review]
evolution-data-server-1.9.91-hyperlinks.patch

Thanks to fejj hints (on IRC) it's finally working, this patch is against e-d-s-1.9.91 (svn head) and fixes some typos and add support for callto/sip/h323 urls in mail view pane.

The gtkhtml patch still applys to gtkhtml svn head and should fix composer part.

Please note that regarding urls of the type h323:@host(:port), the composer does an hyperlink while the mail view doesn't. If you feel it is improper to let the composer make an hyperlink for this type of URL please comment, I'll cook a revised patch for that.

I mark the evolution patch as obsolete since nothing in evolution uses it.
Comment 24 Srinivasa Ragavan 2007-02-26 06:24:39 UTC
Fixed to TRUNK. Thanks for your patch Gilles.
Comment 25 Srinivasa Ragavan 2007-02-26 06:25:35 UTC
Gilles,

As we discussed on IRC, you can do the evolution UI part and post that in a seperate bug. We should take that in the next version. Thanks.
Comment 26 Srinivasa Ragavan 2007-03-21 18:39:59 UTC
Gilles, sorry to reopen again. regression!!

Go to a new line. Press tab then type https://novell.com[ENTER]

It doesn't recognize. But if you do it otherwise it works.
Comment 27 Gilles Dartiguelongue 2007-03-21 19:52:21 UTC
aaaaaaaaarrrrrrgggg regression !!!

This is my fault, I didn't think of the tab. You can either strip "(^| )" of each expression (which would lead to link being created for things like this: "thisisatesthttp://novell.com[enter] ) or add tab (and any other blank space I may have missed or any separator you think is reasonable) in the expression, resulting in the beginning of each expression looking something like this : "(^| |\t)"
Comment 28 Gilles Dartiguelongue 2007-03-22 09:54:53 UTC
coming to think of it, you could even say, anything that is not alpha char is considered as a separator. But it would introduce the problem of accentuated characters and cie.

gnome-terminal seems to have a slightly different approach to handle url surrounding but I didn't looked deeply enough. 
Comment 29 Srinivasa Ragavan 2007-03-22 11:21:46 UTC
Im not sure. But atleast some commonly used stuff could be categorized as seperator and rest we can take a stand. I use tab very often, and Im sure many others :)
Comment 30 Gilles Dartiguelongue 2007-04-06 22:57:40 UTC
would probably be a good idea to sort this out before 2.18.1 release ?
Comment 31 Srinivasa Ragavan 2007-04-09 05:27:26 UTC
Gilles, can you patch with tab atleast? 
Comment 32 Gilles Dartiguelongue 2007-04-09 20:36:31 UTC
Created attachment 86069 [details] [review]
gtkhtml-3.14-url-separation.patch

this patch is against svn head and removes the part that is problematic. We need something smarter to get proper url separations if really wanted.
Comment 33 Srinivasa Ragavan 2007-04-12 05:49:11 UTC
Great. Please commit to stable/head.
Comment 34 Srinivasa Ragavan 2007-04-20 04:38:38 UTC
Committed to stable/trunk.