From fb342cfb5488d3e6d1c0c13d5454b6fb3c2a6dbf Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 28 Nov 2022 22:34:14 -0700 Subject: Fix hashtagging of HTML entities --- tests/core/test_html.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') 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("
Hi!
\n\nHow are
you?
today
") == "Hi!\n\nHow are\n you?\n\ntoday" ) + + +def test_sanitize_post(): + + assert sanitize_post("Hello!
") == "Hello!
" + assert sanitize_post("It's great
") == "It's great
" -- cgit v1.2.3