static_fe: Sanitize HTML in users
This commit is contained in:
parent
acb016397e
commit
8176ca9e40
5 changed files with 33 additions and 25 deletions
|
|
@ -5,7 +5,6 @@
|
|||
defmodule Pleroma.Web.AdminAPI.AccountView do
|
||||
use Pleroma.Web, :view
|
||||
|
||||
alias Pleroma.HTML
|
||||
alias Pleroma.User
|
||||
alias Pleroma.Web.AdminAPI.AccountView
|
||||
alias Pleroma.Web.MediaProxy
|
||||
|
|
@ -26,7 +25,8 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
|
|||
|
||||
def render("show.json", %{user: user}) do
|
||||
avatar = User.avatar_url(user) |> MediaProxy.url()
|
||||
display_name = HTML.strip_tags(user.name || user.nickname)
|
||||
display_name = Pleroma.HTML.strip_tags(user.name || user.nickname)
|
||||
user = User.sanitize_html(user, FastSanitize.Sanitizer.StripTags)
|
||||
|
||||
%{
|
||||
"id" => user.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue