diff pidgin/gtkimhtml.c @ 25355:c6f7143cc7f4

Only find URLs on word boundaries to fix a bug rlaager noticed. committer: Richard Laager <rlaager@wiktel.com>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 02 Dec 2008 17:14:54 +0000
parents 48cf0a545621
children b01a7f17a2bb
line wrap: on
line diff
--- a/pidgin/gtkimhtml.c	Mon Dec 01 19:44:13 2008 +0000
+++ b/pidgin/gtkimhtml.c	Tue Dec 02 17:14:54 2008 +0000
@@ -3302,7 +3302,8 @@
 			}
 			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);