Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

can't parse entities: Unsupported start tag "br" #152

Closed guangrei closed 6 years ago

guangrei commented 6 years ago

Hi, i got error message above when use HTML as parse_mode

here is my code :

$test = "one \n two \n tri";

$content = array('chat_id' => $chat_id, 'text' => nl2br($test), 'parse_mode' => "HTML");

$telegram->sendMessage($content);
usernein commented 6 years ago

Telegram Bot API currently supports only <b>, <i>, <a>,<code> and <pre> tags, for HTML parse mode

guangrei commented 6 years ago

thx solved nl2br($test, false)