From 8df11c030c7f9e2a018817ba8b12e7b4c1b78042 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sun, 7 Oct 2012 13:27:44 +0200 Subject: Fix Wikipedia URL detection - URLs inside parentheses won't work --- src/common/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common/url.c') 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) -- cgit 1.4.1