]> git.scottworley.com Git - paperdoorknob/blame - htmlfilter_test.py
Handle Unicode characters ≈ and ◁
[paperdoorknob] / htmlfilter_test.py
CommitLineData
929db576
SW
1# paperdoorknob: Print glowfic
2#
3# This program is free software: you can redistribute it and/or modify it
4# under the terms of the GNU General Public License as published by the
5# Free Software Foundation, version 3.
6
7
8import unittest
9from htmlfilter import ApplyHTMLFilters
10
11
12class TestHTMLFilters(unittest.TestCase):
13
14 def testStripNBSP(self) -> None:
15 self.assertEqual(
16 ApplyHTMLFilters(
17 "NoNBSP",
18 b"<p>It's&nbsp;<em>really&nbsp;</em>cold.</p>"),
19 b"<p>It's <em>really </em>cold.</p>")
20
21
22if __name__ == '__main__':
23 unittest.main()