From 70f831e4c04a3fddf9200707956b3ba7db62108d Mon Sep 17 00:00:00 2001 From: Serge Barinov Date: Sun, 5 Jun 2022 09:42:39 +0300 Subject: [PATCH] fix: escape user full name for mention Former-commit-id: 09e7597fa757c229fbe207683f42b0940dafa1c5 --- src/utils/markdown.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())), } }