pidgin: f788ca46: Fix the auto-linking of protocols.

sadrul at pidgin.im sadrul at pidgin.im
Sun Apr 5 13:05:36 EDT 2009


-----------------------------------------------------------------
Revision: f788ca469fe818568012bcf1665f6b1af5a45e4f
Ancestor: 0f0a3d5ad3928e605399ee5651b889a01e29d178
Author: sadrul at pidgin.im
Date: 2009-04-05T16:54:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f788ca469fe818568012bcf1665f6b1af5a45e4f

Modified files:
        pidgin/gtkimhtml.c

ChangeLog: 

Fix the auto-linking of protocols.

This should fix the problem QuLogic noticed with 'irc:' etc. getting
linked in the debug window.

-------------- next part --------------
============================================================
--- pidgin/gtkimhtml.c	d233fe9c3a5a9a7e16477fa5acefef3d2ee9a6c1
+++ pidgin/gtkimhtml.c	114089733e7aa089ed0ebda608f12861760be3cd
@@ -3320,7 +3320,8 @@ void gtk_imhtml_insert_html_at_iter(GtkI
 			pos++;
 		} else if ((pos == 0 || wpos == 0 || isspace(*(c - 1))) &&
 		           (len_protocol = gtk_imhtml_is_protocol(c)) > 0 &&
-				   c[len_protocol] && !isspace(c[len_protocol])) {
+				   c[len_protocol] && !isspace(c[len_protocol]) &&
+				   (c[len_protocol] != '<' || !gtk_imhtml_is_tag(c + 1, NULL, NULL, NULL))) {
 			br = FALSE;
 			if (wpos > 0) {
 				gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);


More information about the Commits mailing list