              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:
                      pass
              elif not ':' in middle and simple_email_re.match(middle):
                  local, domain = middle.rsplit('@', 1)
                  try:
                      domain = domain.encode('idna').decode('ascii')
                  except UnicodeError:
 
</s> remove                 url = smart_urlquote(middle)
 </s> add                 url = smart_urlquote_wrapper(middle)
                url = smart_urlquote_wrapper('http://%s' % middle)
              nofollow_attr = ' rel="nofollow"' if nofollow else ''
              if simple_url_re.match(middle):
                  url = smart_urlquote(middle)
              elif simple_url_2_re.match(middle):
                url = smart_urlquote_wrapper('http://%s' % middle)
                url = smart_urlquote_wrapper('http://%s' % middle)
                url = smart_urlquote_wrapper('http://%s' % middle)
                url = smart_urlquote_wrapper('http://%s' % middle)
                url = smart_urlquote_wrapper('http://%s' % middle)
              elif not ':' in middle and simple_email_re.match(middle):
                  local, domain = middle.rsplit('@', 1)
                  try:
                      domain = domain.encode('idna').decode('ascii')
                  except UnicodeError:
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 wrapper for smart_urlquote, issue #1386 
rest_framework/templatetags/rest_framework.py