changeset 25864: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 b6f2c637a3d9
children 726b251cb913
files pidgin/gtkimhtml.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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);