aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorensra <ensra@users.noreply.github.com>2018-08-21 15:24:06 +0100
committerensra <ensra@users.noreply.github.com>2018-08-21 15:24:06 +0100
commitf533daffdbbf2912677868c68f2ca0e28f8db347 (patch)
treed661648c86a41f1229f457e9b78a9b814f436695
parent1495d04789239f78e06c7b4af4219f54be15eeaa (diff)
downloadpleroma-f533daffdbbf2912677868c68f2ca0e28f8db347.tar.gz
sync bio sanitization code in tests
-rw-r--r--test/web/twitter_api/views/user_view_test.exs16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/web/twitter_api/views/user_view_test.exs b/test/web/twitter_api/views/user_view_test.exs
index fefb6bdcc..180b7602e 100644
--- a/test/web/twitter_api/views/user_view_test.exs
+++ b/test/web/twitter_api/views/user_view_test.exs
@@ -65,8 +65,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"name" => user.name,
"screen_name" => user.nickname,
"name_html" => user.name,
- "description" => HtmlSanitizeEx.strip_tags(user.bio),
- "description_html" => HtmlSanitizeEx.strip_tags(user.bio),
+ "description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
+ "description_html" => HtmlSanitizeEx.basic_html(user.bio),
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 1,
@@ -104,8 +104,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"name" => user.name,
"screen_name" => user.nickname,
"name_html" => user.name,
- "description" => HtmlSanitizeEx.strip_tags(user.bio),
- "description_html" => HtmlSanitizeEx.strip_tags(user.bio),
+ "description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
+ "description_html" => HtmlSanitizeEx.basic_html(user.bio),
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
@@ -144,8 +144,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"name" => follower.name,
"screen_name" => follower.nickname,
"name_html" => follower.name,
- "description" => HtmlSanitizeEx.strip_tags(follower.bio),
- "description_html" => HtmlSanitizeEx.strip_tags(follower.bio),
+ "description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
+ "description_html" => HtmlSanitizeEx.basic_html(user.bio),
"created_at" => follower.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
@@ -191,8 +191,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"name" => user.name,
"screen_name" => user.nickname,
"name_html" => user.name,
- "description" => HtmlSanitizeEx.strip_tags(user.bio),
- "description_html" => HtmlSanitizeEx.strip_tags(user.bio),
+ "description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("<br>", "\n")),
+ "description_html" => HtmlSanitizeEx.basic_html(user.bio),
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,