aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2018-08-09 13:07:03 +0300
committereal <eal@waifu.club>2018-08-09 13:07:03 +0300
commit37b802682ce1231f99976538a11c1584d48f47f4 (patch)
treeac0dd479f34768d8459a0960027070c9c6db2594 /lib
parented9738e031e02a9338bedd3a8f3ff73329c101e7 (diff)
downloadpleroma-37b802682ce1231f99976538a11c1584d48f47f4.tar.gz
HTML-sanitize usernames before emojifying.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/twitter_api/views/user_view.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex
index 30aaaf1ce..7d0f0e703 100644
--- a/lib/pleroma/web/twitter_api/views/user_view.ex
+++ b/lib/pleroma/web/twitter_api/views/user_view.ex
@@ -50,7 +50,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
"friends_count" => user_info[:following_count],
"id" => user.id,
"name" => user.name,
- "name_html" => Formatter.emojify(user.name, emoji),
+ "name_html" => HtmlSanitizeEx.strip_tags(user.name) |> Formatter.emojify(emoji),
"profile_image_url" => image,
"profile_image_url_https" => image,
"profile_image_url_profile_size" => image,