mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 06:58:58 +00:00
Remove html from user bios on display.
This is mainly to fix problems of bios coming from mastodong.
This commit is contained in:
parent
cde5d6b71c
commit
7b41e103e1
|
@ -18,7 +18,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenter do
|
|||
"id" => user.id,
|
||||
"name" => user.name,
|
||||
"screen_name" => user.nickname,
|
||||
"description" => user.bio,
|
||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
||||
"following" => following,
|
||||
"created_at" => created_at,
|
||||
# Fake fields
|
||||
|
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenterTest do
|
|||
import Pleroma.Factory
|
||||
|
||||
setup do
|
||||
user = insert(:user)
|
||||
user = insert(:user, bio: "<span>Here's some html</span>")
|
||||
[user: user]
|
||||
end
|
||||
|
||||
|
@ -39,7 +39,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenterTest do
|
|||
"id" => user.id,
|
||||
"name" => user.name,
|
||||
"screen_name" => user.nickname,
|
||||
"description" => user.bio,
|
||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
||||
"created_at" => created_at,
|
||||
# Fake fields
|
||||
"favourites_count" => 0,
|
||||
|
@ -66,7 +66,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenterTest do
|
|||
"id" => user.id,
|
||||
"name" => user.name,
|
||||
"screen_name" => user.nickname,
|
||||
"description" => user.bio,
|
||||
"description" => HtmlSanitizeEx.strip_tags(user.bio),
|
||||
"created_at" => created_at,
|
||||
# Fake fields
|
||||
"favourites_count" => 0,
|
||||
|
|
Loading…
Reference in a new issue