class documentation
class Urlizer: (source)
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 |
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 |
Undocumented |
Method | trim |
Trim trailing and wrapping punctuation from `word`. Return the items of the new state. |
Method | trim |
Undocumented |
Class Variable | mailto |
Undocumented |
Class Variable | simple |
Undocumented |
Class Variable | simple |
Undocumented |
Class Variable | trailing |
Undocumented |
Class Variable | url |
Undocumented |
Class Variable | word |
Undocumented |
Class Variable | wrapping |
Undocumented |
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