Fix Wikipedia URL detection - URLs inside parentheses won't work

This commit is contained in:
Berke Viktor
2012-10-07 13:27:44 +02:00
parent 59f32ccb3a
commit 8df11c030c
2 changed files with 8 additions and 1 deletions

View File

@@ -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)