1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-11-21 06:45:46 +00:00

MessageEntity#asHtmlSource

This commit is contained in:
2019-03-27 09:35:37 +08:00
parent 1bdcf3ae60
commit 609a474874
14 changed files with 67 additions and 33 deletions

View File

@@ -9,3 +9,17 @@ fun String.toMarkdown(): String {
"\\_"
)
}
fun String.toHtml(): String = replace(
"<",
"&lt;"
).replace(
">",
"&gt;"
).replace(
"&",
"&amp;"
).replace(
"\"",
"&quot;"
)