remove escaping of variable values as it is handled by jinja2 since at least 2.10

This commit is contained in:
Christian Ulrich 2021-05-17 15:19:40 +02:00
parent 943d1f2edd
commit e1d01001ab
2 changed files with 2 additions and 33 deletions

View file

@ -63,24 +63,3 @@ class RenderTestCase(TestCase):
def test_create_text_span_node(self):
assert self.engine.create_text_span_node(self.document, 'text').toxml() == '<text:span>text</text:span>'
class EscapingVariablesValues(TestCase):
"""
Test encoding of line feed and tab variables valuess
"""
def test_encode_linefeed_char(self):
xml = 'This\nLF'
expected = 'This<text:line-break/>LF'
assert (Renderer.get_escaped_var_value(xml) == expected)
def test_encode_linefeed_char(self):
xml = 'This\tTab char'
expected = 'This<text:tab/>Tab char'
assert (Renderer.get_escaped_var_value(xml) == expected)
def test_escape_xml_reserved_chars(self):
''' Should also escape minor and mayor signs '''
xml = '1 is > than 0 & -1 is <'
expected = '1 is &gt; than 0 &amp; -1 is &lt;'
assert (Renderer.get_escaped_var_value(xml) == expected)