From cfb6503cac5796b7e2613a4fd48d8bde75b3d809 Mon Sep 17 00:00:00 2001
From: jozefrebjak <36922215+jozefrebjak@users.noreply.github.com>
Date: Mon, 23 Jul 2018 18:57:07 +0200
Subject: [PATCH] Support for HTML tags in TELEGRAM transport (#8929)
This update will add support for HTML tags in TELEGRAM Transport
Here is the list of all tags that you can use in alert template for telegram transport.
```
bold, bold
italic, italic
inline URL
inline fixed-width code
pre-formatted fixed-width code block
```
DO NOT DELETE THIS TEXT
#### Please note
> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.
- [ ] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)
#### Testers
If you would like to test this pull request then please run: `./scripts/github-apply `, i.e `./scripts/github-apply 5926`
---
LibreNMS/Alert/Transport/Telegram.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/LibreNMS/Alert/Transport/Telegram.php b/LibreNMS/Alert/Transport/Telegram.php
index 0396a1e77d..ecfb5859aa 100644
--- a/LibreNMS/Alert/Transport/Telegram.php
+++ b/LibreNMS/Alert/Transport/Telegram.php
@@ -51,7 +51,7 @@ class Telegram extends Transport
$curl = curl_init();
set_curl_proxy($curl);
$text = urlencode($obj['msg']);
- curl_setopt($curl, CURLOPT_URL, ("https://api.telegram.org/bot{$data['token']}/sendMessage?chat_id={$data['chat_id']}&text=$text"));
+ curl_setopt($curl, CURLOPT_URL, ("https://api.telegram.org/bot{$data['token']}/sendMessage?chat_id={$data['chat_id']}&parse_mode=html&text=$text"));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_exec($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);