# HG changeset patch # User Aurelien Campeas # Date 1529333683 -7200 # Mon Jun 18 16:54:43 2018 +0200 # Node ID 319e877a5db83def67112b65937e9f08051523f0 # Parent 818bae845e8ad8aff2e8261acb286660ef538a23 fix no escape + child node diff --git a/pml.py b/pml.py --- a/pml.py +++ b/pml.py @@ -314,7 +314,7 @@ if escape: self._content = list(map(cgi.escape, content)) else: - self._content = content + self._content = list(content) if 'newlines' in kw: # special-case to allow control over newlines self._newlines = kw.pop('newlines') diff --git a/tests/test_html.py b/tests/test_html.py --- a/tests/test_html.py +++ b/tests/test_html.py @@ -88,8 +88,7 @@ self.assertEquals(str(h), '<>&') with h.p('hello', escape=False) as p: - with self.assertRaises(AttributeError): - p.a('world', href='http://perdu.com') + p.a('world', href='http://perdu.com') def test_escape_attr(self): 'escaping of special HTML characters in attributes'