]> git.scottworley.com Git - paperdoorknob/blob - htmlfilter_test.py
Support _ in URLs
[paperdoorknob] / htmlfilter_test.py
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
8 import unittest
9 from htmlfilter import ApplyHTMLFilters
10
11
12 class 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
22 if __name__ == '__main__':
23 unittest.main()