mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-22 11:04:21 +00:00
Simplify escape_telegram_html
This commit is contained in:
parent
ebfcfe45e3
commit
bcb1793f00
1 changed files with 4 additions and 5 deletions
|
@ -19,10 +19,9 @@ impl<T> TelegramEscape for T
|
||||||
where String: From<T>
|
where String: From<T>
|
||||||
{
|
{
|
||||||
fn escape_telegram_html(self) -> String {
|
fn escape_telegram_html(self) -> String {
|
||||||
let s: String = String::from(self);
|
String::from(self)
|
||||||
let s = s.replace("<", "<");
|
.replace("<", "<")
|
||||||
let s = s.replace(">", ">");
|
.replace(">", ">")
|
||||||
let s = s.replace("&", "&");
|
.replace("&", "&")
|
||||||
s
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue