summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorRichardHitt <rbh00@netcom.com>2013-03-29 13:16:32 -0700
committerRichardHitt <rbh00@netcom.com>2013-03-29 13:16:32 -0700
commitf317076cb23745d3b03d09bde817fb66bdf81a26 (patch)
tree7c17daca7d21a5366a0d9c970a187305eee57bc1 /src/common
parent1ed3879c4f0ded33c74b83758e061fd67bdcdb0a (diff)
parent503968c1fd0817a9e562af6615c8d938124db961 (diff)
Merge pull request #479 from RichardHitt/urlgrab
Strip all \r and \n, not just a single \r.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/url.c2
1 files changed, 1 insertions, 1 deletions
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);