aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/twitter_api/representers/activity_representer.ex2
-rw-r--r--lib/pleroma/web/twitter_api/views/activity_view.ex2
-rw-r--r--lib/pleroma/web/twitter_api/views/user_view.ex2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
index 5c4eed671..b21bbb205 100644
--- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex
@@ -168,7 +168,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
{summary, content} = ActivityView.render_content(object)
html =
- HTML.filter_tags(content)
+ HTML.filter_tags(content, User.html_filter_policy(opts[:for]))
|> Formatter.emojify(object["emoji"])
video =
diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex
index 666a35a24..b9fd062d6 100644
--- a/lib/pleroma/web/twitter_api/views/activity_view.ex
+++ b/lib/pleroma/web/twitter_api/views/activity_view.ex
@@ -233,7 +233,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
{summary, content} = render_content(object)
html =
- HTML.filter_tags(content)
+ HTML.filter_tags(content, User.html_filter_policy(opts[:for]))
|> Formatter.emojify(object["emoji"])
%{
diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex
index f2641047f..cec9e11a0 100644
--- a/lib/pleroma/web/twitter_api/views/user_view.ex
+++ b/lib/pleroma/web/twitter_api/views/user_view.ex
@@ -40,7 +40,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
data = %{
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"description" => HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
- "description_html" => HTML.filter_tags(user.bio),
+ "description_html" => HTML.filter_tags(user.bio, User.html_filter_policy(assigns[:for])),
"favourites_count" => 0,
"followers_count" => user_info[:follower_count],
"following" => following,