restrict html processing to a certain number of tags

This commit is contained in:
Sergey Obukhov
2016-09-14 09:33:30 -07:00
parent f04b872e14
commit ea82a9730e
3 changed files with 12 additions and 3 deletions

View File

@@ -385,7 +385,7 @@ def test_gmail_forwarded_msg():
eq_(RE_WHITESPACE.sub('', msg_body), RE_WHITESPACE.sub('', extracted))
@patch.object(quotations, 'MAX_HTML_LEN', 1)
@patch.object(quotations, '_MAX_TAGS_COUNT', 4)
def test_too_large_html():
msg_body = 'Reply' \
'<div class="gmail_quote">' \