Fixed IPv6 support for urlize_quoted_links template tag

Ported from this fix:
https://code.djangoproject.com/ticket/20172