Skip to content

Ошибка парсинга многосоставной HTML строки #18

Description

@LittleBuster

Версия бота 1.0.8
ESP32S3 N16R8
Framework ver.: 2.0.17

Пример отправки сообщения

    fb::Message resp;
    fb::Menu    menu;

    resp.chatID = user->chatId;
    resp.mode = fb::Message::Mode::HTML;

    String name = "test";
    resp.text = "<b>" + name + "</b>";
   //resp.text = String("<b>") + String("test") + String("</b>");

    resp.setMenu(menu);
    bot.sendMessage(resp);

В core.h в функции _parseResponse функция res.parseJson(); возвращает false.
В result.h с ошибкой выходит на этой строке

if (!_parser[tg_apih::ok].toBool()) return 0;

Решается сложением строк обходным путем:

    resp.text.concat("<b>");
    resp.text.concat(name);
    resp.text.concat("</b>");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions