当parse_mode = Markdown时,在电报API中转义下划线

mit*_*ara 4 telegram php-telegram-bot

如何正确发送此文本:

$parameters['text'] = 'you must see [example](example.com) or contact with @exmaple_com';
Run Code Online (Sandbox Code Playgroud)

如果我不使用“ Markdown”,则电报不会显示上述链接;如果我使用“ Markdown”,则电报将无法处理下划线。

tas*_*ori 6

您应该使用反斜杠来实现:

$parameters['text'] = 'you must see [example](example.com) or contact with @exmaple\\_com';
Run Code Online (Sandbox Code Playgroud)