Fix bad range in URL regex
Properly handle ]] and }} in links this time