diff --git a/mf2py/parse_property.py b/mf2py/parse_property.py index 3d2222b..a95ce8f 100644 --- a/mf2py/parse_property.py +++ b/mf2py/parse_property.py @@ -112,5 +112,5 @@ def embedded(el, base_url, root_lang, document_lang, expose_dom): if expose_dom: prop_value["dom"] = el else: - prop_value["html"] = el.decode_contents().strip() + prop_value["html"] = el.decode_contents(formatter="html5").strip() return prop_value diff --git a/test/test_parser.py b/test/test_parser.py index 767d369..1a36dfb 100644 --- a/test/test_parser.py +++ b/test/test_parser.py @@ -403,7 +403,7 @@ def test_relative_url_in_e(): assert ( '
' + '' ) == result["items"][0]["properties"]["content"][0]["html"]