Verified Commit 0e2c215a authored by Haelwenn's avatar Haelwenn

MastoAPI AccountView: fill source.note with plaintext version of note

Closes: #926
parent b30b51c3
......@@ -112,7 +112,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
fields: fields,
bot: bot,
source: %{
note: "",
note: HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
sensitive: false,
pleroma: %{}
},
......
......@@ -55,7 +55,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
fields: [],
bot: false,
source: %{
note: "",
note: "valid html",
sensitive: false,
pleroma: %{}
},
......@@ -120,7 +120,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
fields: [],
bot: true,
source: %{
note: "",
note: user.bio,
sensitive: false,
pleroma: %{}
},
......@@ -209,7 +209,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
fields: [],
bot: true,
source: %{
note: "",
note: user.bio,
sensitive: false,
pleroma: %{}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment