mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-29 20:52:16 -05:00
Merge pull request #479 from RichardHitt/urlgrab
Strip all \r and \n, not just a single \r.
This commit is contained in:
commit
f317076cb2
@ -288,7 +288,7 @@ url_check_line (char *buf, int len)
|
|||||||
int start, end;
|
int start, end;
|
||||||
|
|
||||||
g_match_info_fetch_pos(gmi, 0, &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;
|
po[--end] = 0;
|
||||||
if (g_strstr_len (po + start, end - start, "://"))
|
if (g_strstr_len (po + start, end - start, "://"))
|
||||||
url_add(po + start, end - start);
|
url_add(po + start, end - start);
|
||||||
|
Loading…
Reference in New Issue
Block a user