From 503968c1fd0817a9e562af6615c8d938124db961 Mon Sep 17 00:00:00 2001 From: RichardHitt Date: Fri, 29 Mar 2013 13:11:17 -0700 Subject: Strip all \r and \n, not just a single \r. --- src/common/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/url.c b/src/common/url.c index 2007b600..717e1906 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -288,7 +288,7 @@ url_check_line (char *buf, int len) int start, end; g_match_info_fetch_pos(gmi, 0, &start, &end); - if (po[end - 1] == '\r') + while (end > start && (po[end - 1] == '\r' || po[end - 1] == '\n')) po[--end] = 0; if (g_strstr_len (po + start, end - start, "://")) url_add(po + start, end - start); -- cgit 1.4.1