Compare commits
No commits in common. "99554cb461ba26a57815b2e154bcc0df08abcf3c" and "e9a5bcb8909cce9d1136e00e099e74accd2d1323" have entirely different histories.
99554cb461
...
e9a5bcb890
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ TRAILING_PUNCTUATION = ['.', ',', ')', '>', '\n', '>', "'", '"']
|
||||||
DOTS = ['·', '*', '\xe2\x80\xa2', '•', '•', '•']
|
DOTS = ['·', '*', '\xe2\x80\xa2', '•', '•', '•']
|
||||||
|
|
||||||
unencoded_ampersands_re = re.compile(r'&(?!(\w+|#\d+);)')
|
unencoded_ampersands_re = re.compile(r'&(?!(\w+|#\d+);)')
|
||||||
word_split_re = re.compile(r'(\s+|<br>)')
|
word_split_re = re.compile(r'(\s+)')
|
||||||
punctuation_re = re.compile('^(?P<lead>(?:%s)*)(?P<middle>.*?)(?P<trail>(?:%s)*)$' % (
|
punctuation_re = re.compile('^(?P<lead>(?:%s)*)(?P<middle>.*?)(?P<trail>(?:%s)*)$' % (
|
||||||
'|'.join([re.escape(x) for x in LEADING_PUNCTUATION]),
|
'|'.join([re.escape(x) for x in LEADING_PUNCTUATION]),
|
||||||
'|'.join([re.escape(x) for x in TRAILING_PUNCTUATION])))
|
'|'.join([re.escape(x) for x in TRAILING_PUNCTUATION])))
|
||||||
|
@ -392,8 +392,8 @@ def sanitize_html(html, tags=None, global_attributes=[]):
|
||||||
else:
|
else:
|
||||||
parts[i] = escape_html(decode_html(part))
|
parts[i] = escape_html(decode_html(part))
|
||||||
html = ''.join(parts)
|
html = ''.join(parts)
|
||||||
|
html = html.replace('\n\n', '<br/><br/>')
|
||||||
html = add_links(html)
|
html = add_links(html)
|
||||||
html = html.replace('\n\n', '<br><br>')
|
|
||||||
return sanitize_fragment(html)
|
return sanitize_fragment(html)
|
||||||
|
|
||||||
def split_tags(string):
|
def split_tags(string):
|
||||||
|
|
Loading…
Reference in a new issue