diff --git a/src/danog/MadelineProto/StrTools.php b/src/danog/MadelineProto/StrTools.php
index 9314501e5..ec55c4159 100644
--- a/src/danog/MadelineProto/StrTools.php
+++ b/src/danog/MadelineProto/StrTools.php
@@ -158,7 +158,7 @@ abstract class StrTools extends Extension
if ($markdown === '') {
return $markdown;
}
- $html = (new Parsedown($markdown))->text($markdown);
+ $html = Parsedown::instance()->text($markdown);
$document = new DOMDocument('', 'utf-8');
@$document->loadHTML(\mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
if (!$document->getElementsByTagName('body')[0]) {
diff --git a/src/danog/MadelineProto/TL/Conversion/DOMEntities.php b/src/danog/MadelineProto/TL/Conversion/DOMEntities.php
index 83c7e58e5..b470ec39f 100644
--- a/src/danog/MadelineProto/TL/Conversion/DOMEntities.php
+++ b/src/danog/MadelineProto/TL/Conversion/DOMEntities.php
@@ -24,7 +24,7 @@ final class DOMEntities
{
$dom = new \DOMDocument();
$html = \preg_replace("/\
/i", "\n", $html);
- $dom->loadxml("
pre
code