Fix wrong handling of links with '|' character (#1489276)