From 92ce4cda8d4d207c11e9e9a3fad68e930ad8e55b Mon Sep 17 00:00:00 2001 From: schism Date: Fri, 5 Mar 2021 16:31:55 +0530 Subject: [PATCH] Telegram message correction - Shadow correction --- web/php/Telegram.php | 8 +++++--- web/style/main.css | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web/php/Telegram.php b/web/php/Telegram.php index 130e6cc..d361ccd 100644 --- a/web/php/Telegram.php +++ b/web/php/Telegram.php @@ -6,13 +6,15 @@ class Telegram { } function sendMessage($chatId, $text, $options = []) { - - send_post("https://api.telegram.org/bot{$this->token}/sendMessage", [ + $text = str_replace(".", "\\.", $text); + $text = str_replace("=", "\\=", $text); + $text = str_replace("_", "\\_", $text); + return send_post("https://api.telegram.org/bot{$this->token}/sendMessage", [ "chat_id" => $chatId, "text" => $text, "parse_mode" => isset($options["parse_mode"])? $options["parse_mode"] : "MarkdownV2", "disable_web_page_preview" => isset($options["disable_web_page_preview"])? $options["disable_web_page_preview"] : false, - ]); + ]); } function setWebhook($url) { diff --git a/web/style/main.css b/web/style/main.css index a085612..b91cbcd 100644 --- a/web/style/main.css +++ b/web/style/main.css @@ -439,8 +439,8 @@ main#dashboard #schedule table { background-color: var(--color-primary-light); border-collapse: collapse; border-radius: 5px; - margin: 20px 0; - width: 100%; + margin: 20px 40px 60px 40px; + width: calc(100% - 80px); /* filter: drop-shadow(10px 10px 30px var(--color-primary-dark)); */ box-shadow: 0 20px 40px rgba(0,0,0,0.2) }