diff -r d601fe848778 -r c863fcecb7dd pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Tue Feb 03 00:45:21 2009 +0000 +++ b/pidgin/gtkimhtml.c Wed Feb 04 13:57:14 2009 +0000 @@ -3319,7 +3319,8 @@ c++; pos++; } else if ((pos == 0 || wpos == 0 || isspace(*(c - 1))) && - (len_protocol = gtk_imhtml_is_protocol(c)) > 0) { + (len_protocol = gtk_imhtml_is_protocol(c)) > 0 && + c[len_protocol] && !isspace(c[len_protocol])) { br = FALSE; if (wpos > 0) { gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);