From f96f8577fc6c6880cc6982d880ca337d2c61afab Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 21 Dec 2019 01:26:06 -0500 Subject: [PATCH] Escape HTML entities in TextConverter::convert This preserves actual HTML entities present in the text node --- src/Converter/TextConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Converter/TextConverter.php b/src/Converter/TextConverter.php index fcd4660..3c92fa3 100644 --- a/src/Converter/TextConverter.php +++ b/src/Converter/TextConverter.php @@ -35,7 +35,7 @@ public function convert(ElementInterface $element) } } - return $markdown; + return htmlentities($markdown, ENT_QUOTES, 'UTF-8'); } /**