Files
bearhub/bauh/commons/html.py
Vinícius Moreira 01a60ea686 0.9.0
2020-04-13 11:49:28 -03:00

16 lines
287 B
Python

import re
HTML_RE = re.compile(r'<[^>]+>')
def strip_html(string: str):
return HTML_RE.sub('', string)
def bold(text: str) -> str:
return '<span style="font-weight: bold">{}</span>'.format(text)
def link(url: str) -> str:
return '<a href="{}">{}</a>'.format(url, url)