diff --git a/CHANGELOG.md b/CHANGELOG.md index 821e928f..52527899 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## unreleased +### Fixed + + - Fix Api Unknown error (Can't parse entities) on message created with `utils::markdown::user_mention_or_link` if user full name contaiins some escapable symbols eg '.' + ## 0.9.1 - 2022-05-27 ### Fixed diff --git a/src/utils/markdown.rs b/src/utils/markdown.rs index 9b120d6a..c07d53d9 100644 --- a/src/utils/markdown.rs +++ b/src/utils/markdown.rs @@ -124,7 +124,7 @@ pub fn escape_code(s: &str) -> String { pub fn user_mention_or_link(user: &User) -> String { match user.mention() { Some(mention) => mention, - None => link(user.url().as_str(), &user.full_name()), + None => link(user.url().as_str(), &escape(&user.full_name())), } }