  
  
  @register.filter
  def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True):
      """
      Converts any URLs in text into clickable links.
 
</s> remove                 url = smart_urlquote(middle)
 </s> add                 url = smart_urlquote_wrapper(middle) </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)
def smart_urlquote_wrapper(matched_url):
    """
    Simple wrapper for smart_urlquote. ValueError("Invalid IPv6 URL") can
    be raised here, see issue #1386
    """
    try:
        return smart_urlquote(matched_url)
    except ValueError:
        return None


  
  
def smart_urlquote_wrapper(matched_url):
    """
    Simple wrapper for smart_urlquote. ValueError("Invalid IPv6 URL") can
    be raised here, see issue #1386
    """
    try:
        return smart_urlquote(matched_url)
    except ValueError:
        return None


  @register.filter
  def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True):
      """
      Converts any URLs in text into clickable links.
keep add keep keep keep keep
 wrapper for smart_urlquote, issue #1386 
rest_framework/templatetags/rest_framework.py