              # Make URL we want to point to.
              url = None
              nofollow_attr = ' rel="nofollow"' if nofollow else ''
              if simple_url_re.match(middle):
                  url = smart_urlquote(middle)
              elif simple_url_2_re.match(middle):
                  # ValueError("Invalid IPv6 URL") can be raised here, see issue #1386
                  try:
                      url = smart_urlquote('http://%s' % middle)
                  except ValueError:
 
</s> remove                 # ValueError("Invalid IPv6 URL") can be raised here, see issue #1386
                try:
                    url = smart_urlquote('http://%s' % middle)
                except ValueError:
                    pass
 </s> add                 url = smart_urlquote_wrapper('http://%s' % middle)
                url = smart_urlquote_wrapper(middle)
              # Make URL we want to point to.
              url = None
              nofollow_attr = ' rel="nofollow"' if nofollow else ''
              if simple_url_re.match(middle):
                url = smart_urlquote_wrapper(middle)
              elif simple_url_2_re.match(middle):
                  # ValueError("Invalid IPv6 URL") can be raised here, see issue #1386
                  try:
                      url = smart_urlquote('http://%s' % middle)
                  except ValueError:
keep keep keep keep replace keep keep keep keep keep
 wrapper for smart_urlquote, issue #1386 
rest_framework/templatetags/rest_framework.py