code: def urlize_twitter(text):
      
      html = TwitterText(text).autolink.auto_link()
      return mark_safe(html.replace(
          'twitter.com/search?q=', 'twitter.com/search/realtime/'))
docs: Replace #hashtag and @username references in a tweet with HTML text.