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

Tue, 02 Dec 2008 17:14:54 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Tue, 02 Dec 2008 17:14:54 +0000
branch
next.minor
changeset 25011
39bfe35b2980
parent 25009
2a52153c3e86
child 25012
7a6cb07f2366

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


committer: Richard Laager <rlaager@pidgin.im>

pidgin/gtkimhtml.c file | annotate | diff | comparison | revisions
--- 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);

mercurial