This commit is contained in:
danogentili 2017-02-16 21:25:08 +03:00
parent 8f376e2c37
commit 27d588bbf4

View File

@ -640,10 +640,10 @@ trait TL
$arguments['parse_mode'] = 'HTML'; $arguments['parse_mode'] = 'HTML';
} }
if (preg_match('/html/i', $arguments['parse_mode'])) { if (preg_match('/html/i', $arguments['parse_mode'])) {
$nmessage = '';
try { try {
$dom = new \DOMDocument(); $dom = new \DOMDocument();
$dom->loadHTML(str_replace("\n", '<br>', $arguments['message'])); $dom->loadHTML(str_replace("\n", '<br>', $arguments['message']));
$nmessage = '';
if (!isset($arguments['entities'])) { if (!isset($arguments['entities'])) {
$arguments['entities'] = []; $arguments['entities'] = [];
} }
@ -654,8 +654,8 @@ trait TL
} catch (\DOMException $e) { } catch (\DOMException $e) {
} catch (\danog\MadelineProto\Exception $e) { } catch (\danog\MadelineProto\Exception $e) {
} }
$arguments['message'] = $nmessage;
} }
$arguments['message'] = $nmessage;
return $arguments; return $arguments;
} }