class documentation

class Urlizer: (source)

View In Hierarchy

Convert any URLs in text into clickable links. Work on http://, https://, www. links, and also on links ending in one of the original seven gTLDs (.com, .edu, .gov, .int, .mil, .net, and .org). Links can have trailing punctuation (periods, commas, close-parens) and leading punctuation (opening parens) and it'll still do the right thing.

Static Method is_email_simple Return True if value looks like an email address.
Method __call__ If trim_url_limit is not None, truncate the URLs in the link text longer than this limit to trim_url_limit - 1 characters and append an ellipsis.
Method handle_word Undocumented
Method trim_punctuation Trim trailing and wrapping punctuation from `word`. Return the items of the new state.
Method trim_url Undocumented
Class Variable mailto_template Undocumented
Class Variable simple_url_2_re Undocumented
Class Variable simple_url_re Undocumented
Class Variable trailing_punctuation_chars Undocumented
Class Variable url_template Undocumented
Class Variable word_split_re Undocumented
Class Variable wrapping_punctuation Undocumented
@staticmethod
def is_email_simple(value): (source)

Return True if value looks like an email address.

def __call__(self, text, trim_url_limit=None, nofollow=False, autoescape=False): (source)

If trim_url_limit is not None, truncate the URLs in the link text longer than this limit to trim_url_limit - 1 characters and append an ellipsis. If nofollow is True, give the links a rel="nofollow" attribute. If autoescape is True, autoescape the link text and URLs.

def handle_word(self, word, *, safe_input, trim_url_limit=None, nofollow=False, autoescape=False): (source)

Undocumented

def trim_punctuation(self, word): (source)

Trim trailing and wrapping punctuation from `word`. Return the items of the new state.

def trim_url(self, x, *, limit): (source)

Undocumented

mailto_template: str = (source)

Undocumented

simple_url_2_re = (source)

Undocumented

simple_url_re = (source)

Undocumented

trailing_punctuation_chars: str = (source)

Undocumented

url_template: str = (source)

Undocumented

word_split_re = (source)

Undocumented

wrapping_punctuation: list = (source)

Undocumented