diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-10-07 13:27:44 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-10-07 13:27:44 +0200 |
commit | 8df11c030c7f9e2a018817ba8b12e7b4c1b78042 (patch) | |
tree | bd56dd174b253eb31163d5f75970ebd66caa74e4 /src/common | |
parent | 59f32ccb3a1f192c9faf8f51330db918c4ee3d46 (diff) |
Fix Wikipedia URL detection - URLs inside parentheses won't work
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/url.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/url.c b/src/common/url.c index 9b4751ae..3de99d1f 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -106,7 +106,8 @@ url_add (char *urltext, int len) len--; data[len] = 0; } - if (data[len - 1] == ')') /* chop trailing ) */ + /* chop trailing ) but only if there's no counterpart */ + if (data[len - 1] == ')' && strchr (data, '(') == NULL) data[len - 1] = 0; if (!url_tree) |