Bugfixes
This commit is contained in:
parent
8f376e2c37
commit
27d588bbf4
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user