pidgin.next.minor: d7098503: Only find URLs on word boundaries to fix...

rlaager at pidgin.im rlaager at pidgin.im
Tue Dec 2 13:50:29 EST 2008


-----------------------------------------------------------------
Revision: d7098503694dfc998e07e1bff47226c7d5f623b4
Ancestor: 62bf0ee1dda63922e7b455e3609f8bad99e7282c
Author: sadrul at pidgin.im
Date: 2008-12-02T17:14:54
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/d7098503694dfc998e07e1bff47226c7d5f623b4

Modified files:
        pidgin/gtkimhtml.c

ChangeLog: 

Only find URLs on word boundaries to fix a bug rlaager noticed.

-------------- next part --------------
============================================================
--- pidgin/gtkimhtml.c	2240f9b65d6192a9a67927cab2d934d391171295
+++ pidgin/gtkimhtml.c	13b245ed708c664d90ca3e9a530e42f72a07a116
@@ -3302,7 +3302,8 @@ void gtk_imhtml_insert_html_at_iter(GtkI
 			}
 			c++;
 			pos++;
-		} else if ((len_protocol = gtk_imhtml_is_protocol(c)) > 0){
+		} else if ((pos == 0 || wpos == 0 || isspace(*(c - 1))) &&
+		           (len_protocol = gtk_imhtml_is_protocol(c)) > 0) {
 			br = FALSE;
 			if (wpos > 0) {
 				gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);


More information about the Commits mailing list