diff options
author | Andrew Godwin | 2022-11-28 22:34:14 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-28 22:34:14 -0700 |
commit | fb342cfb5488d3e6d1c0c13d5454b6fb3c2a6dbf (patch) | |
tree | 244b2460738108f4e3b7bd98f64ac26f04fa43bf /tests/core | |
parent | 4420507f62bffd38ed9e8ce31a11fa002756143d (diff) | |
download | takahe-fb342cfb5488d3e6d1c0c13d5454b6fb3c2a6dbf.tar.gz takahe-fb342cfb5488d3e6d1c0c13d5454b6fb3c2a6dbf.tar.bz2 takahe-fb342cfb5488d3e6d1c0c13d5454b6fb3c2a6dbf.zip |
Fix hashtagging of HTML entities
Diffstat (limited to 'tests/core')
-rw-r--r-- | tests/core/test_html.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/core/test_html.py b/tests/core/test_html.py index 012a0ce..d4c74dc 100644 --- a/tests/core/test_html.py +++ b/tests/core/test_html.py @@ -1,4 +1,4 @@ -from core.html import html_to_plaintext +from core.html import html_to_plaintext, sanitize_post def test_html_to_plaintext(): @@ -13,3 +13,9 @@ def test_html_to_plaintext(): html_to_plaintext("<p>Hi!</p>\n\n<p>How are<br> you?</p><p>today</p>") == "Hi!\n\nHow are\n you?\n\ntoday" ) + + +def test_sanitize_post(): + + assert sanitize_post("<p>Hello!</p>") == "<p>Hello!</p>" + assert sanitize_post("<p>It's great</p>") == "<p>It's great</p>" |