  html_gunk_re = re.compile(r'(?:<br clear="all">|<i><\/i>|<b><\/b>|<em><\/em>|<strong><\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
  hard_coded_bullets_re = re.compile(r'((?:<p>(?:%s).*?[a-zA-Z].*?</p>\s*)+)' % '|'.join([re.escape(x) for x in DOTS]), re.DOTALL)
  trailing_empty_content_re = re.compile(r'(?:<p>(?:&nbsp;|\s|<br \/>)*?</p>\s*)+\Z')
  
  def urlize_quoted_links(text, trim_url_limit=None, nofollow=False, autoescape=True):
      """
      Converts any URLs in text into clickable links.
  
      Works on http://, https://, www. links and links ending in .org, .net or
      .com. Links can have trailing punctuation (periods, commas, close-parens)
 
</s> remove             login_url = "%s?next=%s" % (settings.LOGIN_URL, self.resource.request.path)
            logout_url = "%s?next=%s" % (settings.LOGOUT_URL, self.resource.request.path)
 </s> add             login_url = "%s?next=%s" % (settings.LOGIN_URL, quote_plus(self.resource.request.path))
            logout_url = "%s?next=%s" % (settings.LOGOUT_URL, quote_plus(self.resource.request.path)) </s> remove from utils import dict2xml, url_resolves
 </s> add from urllib import quote_plus
def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True):
  html_gunk_re = re.compile(r'(?:<br clear="all">|<i><\/i>|<b><\/b>|<em><\/em>|<strong><\/strong>|<\/?smallcaps>|<\/?uppercase>)', re.IGNORECASE)
  hard_coded_bullets_re = re.compile(r'((?:<p>(?:%s).*?[a-zA-Z].*?</p>\s*)+)' % '|'.join([re.escape(x) for x in DOTS]), re.DOTALL)
  trailing_empty_content_re = re.compile(r'(?:<p>(?:&nbsp;|\s|<br \/>)*?</p>\s*)+\Z')
  
def urlize_quoted_links(text, trim_url_limit=None, nofollow=True, autoescape=True):
      """
      Converts any URLs in text into clickable links.
  
      Works on http://, https://, www. links and links ending in .org, .net or
      .com. Links can have trailing punctuation (periods, commas, close-parens)
keep keep keep keep replace keep keep keep keep keep
 Login/Logout and FlyWheel API link in HTML emitter - Add templates, quote next value, only use login/logout if settings.LOGIN_URL and settings.LOGOUT_URL are in urlconf 
flywheel/templatetags/urlize_quoted_links.py