From 7b41e103e1146ed2912cd2c336079947fef71e9a Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 18 Jun 2017 13:17:35 +0200 Subject: Remove html from user bios on display. This is mainly to fix problems of bios coming from mastodong. --- test/web/twitter_api/representers/user_representer_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/web/twitter_api/representers/user_representer_test.exs b/test/web/twitter_api/representers/user_representer_test.exs index d63f738a9..f62ce1da3 100644 --- a/test/web/twitter_api/representers/user_representer_test.exs +++ b/test/web/twitter_api/representers/user_representer_test.exs @@ -8,7 +8,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenterTest do import Pleroma.Factory setup do - user = insert(:user) + user = insert(:user, bio: "Here's some html") [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, -- cgit v1.2.3