django/django — pull request #2873 by dbrgn (2014-07-02 07:37:14+00:00)
Title: Fixed #20003 -- Improved and extended URLValidator

Another attempt at fixing issue 20003, as it was previously attempted in #998.

This adds support for user:password in URLValidator supported URLs.

Additionally, the test suite has been improved by adding test URLs from
http://mathiasbynens.be/demo/url-regex (with a few adjustments, like
allowing local and reserved IPs).

The previous URL validation RegEx failed this test suite on 13
occasions, so I also updated the URLValidator based on
https://gist.github.com/dperini/729294 to correctly validate all URLs in
the test suite. Among other improvements, this also adds support for
IPv4 mapped IPv6 addresses like `::ffff:192.0.2.128`.