From 4d9bf1cad13a43a023cf78670fef2a583fb4ddbf Mon Sep 17 00:00:00 2001 From: Daniel-at-git <63794766+Daniel-at-git@users.noreply.github.com> Date: Thu, 2 Feb 2023 20:40:57 +0100 Subject: [PATCH] Commit 1d23c32de1e3831644494751c961d17d10628ec8 broke sending underscore character in messages (#14204) (#14314) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR reverts commit 1d23c32de1e3831644494751c961d17d10628ec8 and fix #14204. Signed-off-by: Daniel Schröter --- .../binding/telegram/internal/action/TelegramActions.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.telegram/src/main/java/org/openhab/binding/telegram/internal/action/TelegramActions.java b/bundles/org.openhab.binding.telegram/src/main/java/org/openhab/binding/telegram/internal/action/TelegramActions.java index 0aad42dde834c..2a372b5b7f0e3 100644 --- a/bundles/org.openhab.binding.telegram/src/main/java/org/openhab/binding/telegram/internal/action/TelegramActions.java +++ b/bundles/org.openhab.binding.telegram/src/main/java/org/openhab/binding/telegram/internal/action/TelegramActions.java @@ -237,8 +237,7 @@ private boolean sendTelegramGeneral(@ActionInput(name = "chatId") @Nullable Long } TelegramHandler localHandler = handler; if (localHandler != null) { - String escapedMessage = message.replace("_", "\\_"); - SendMessage sendMessage = new SendMessage(chatId, escapedMessage); + SendMessage sendMessage = new SendMessage(chatId, message); if (localHandler.getParseMode() != null) { sendMessage.parseMode(localHandler.getParseMode()); }