Don't encode already encoded entities

This commit is contained in:
Alex Iribarren 2021-03-12 19:06:12 +01:00 committed by Tomas Kopecek
parent 1c7f83acf6
commit 41d5414245
2 changed files with 4 additions and 7 deletions

View file

@ -41,6 +41,8 @@ class TestFormatMode(unittest.TestCase):
('test <danger>', 'test &lt;danger&gt;'),
('test <danger="true">', 'test &lt;danger=&quot;true&quot;&gt;'),
("test <danger='true'>", 'test &lt;danger=&#x27;true&#x27;&gt;'),
('test&test', 'test&amp;test'),
('test&amp;test', 'test&amp;test'),
)
for input, output in tests: