-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mattia Verga <[email protected]>
- Loading branch information
1 parent
7cb0629
commit fbc1b6d
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,19 +265,26 @@ def test_markdown_with_email_in_lt_gt(self): | |
# markdown tries to obfuscate email addresses, bleach versions prior to | ||
# 6.0.0 restored the email in plain text | ||
bleach_v = pkg_resources.get_distribution('bleach').version | ||
if packaging.version.parse(bleach_v) >= packaging.version.parse("6.0.0"): | ||
if packaging.version.parse(bleach_v) >= packaging.version.parse("6.1.0"): | ||
assert res.json_body['html'] == \ | ||
('<div class="markdown">' | ||
'<p>email me at <a href="mailto:du' | ||
'de@mcpants.or' | ||
'g">&#100;&#117;&#100;&#101;&#64;&#109;&#99;' | ||
'&#112;&#97;&#110;&#116;&#115;&#46;&#111;&#114;' | ||
'&#103;</a></p></div>') | ||
else: | ||
'g">dude@mcpants' | ||
'.org</a></p></div>') | ||
elif packaging.version.parse(bleach_v) < packaging.version.parse("6.0.0"): | ||
assert res.json_body['html'] == \ | ||
('<div class="markdown">' | ||
'<p>email me at <a href="mailto:[email protected]">[email protected]</a></p>' | ||
'</div>') | ||
else: | ||
assert res.json_body['html'] == \ | ||
('<div class="markdown">' | ||
'<p>email me at <a href="mailto:du' | ||
'de@mcpants.or' | ||
'g">&#100;&#117;&#100;&#101;&#64;&#109;&#99;' | ||
'&#112;&#97;&#110;&#116;&#115;&#46;&#111;&#114;' | ||
'&#103;</a></p></div>') | ||
|
||
def test_markdown_with_autolink(self): | ||
res = self.app.get('/markdown', { | ||
|