MastoAPI AccountView: fill source.note with plaintext version of note
Closes: https://git.pleroma.social/pleroma/pleroma/issues/926
This commit is contained in:
parent
b30b51c3b7
commit
0e2c215a00
|
@ -112,7 +112,7 @@ defp do_render("account.json", %{user: user} = opts) do
|
|||
fields: fields,
|
||||
bot: bot,
|
||||
source: %{
|
||||
note: "",
|
||||
note: HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
|
||||
sensitive: false,
|
||||
pleroma: %{}
|
||||
},
|
||||
|
|
|
@ -55,7 +55,7 @@ test "Represent a user account" do
|
|||
fields: [],
|
||||
bot: false,
|
||||
source: %{
|
||||
note: "",
|
||||
note: "valid html",
|
||||
sensitive: false,
|
||||
pleroma: %{}
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ test "Represent a Service(bot) account" do
|
|||
fields: [],
|
||||
bot: true,
|
||||
source: %{
|
||||
note: "",
|
||||
note: user.bio,
|
||||
sensitive: false,
|
||||
pleroma: %{}
|
||||
},
|
||||
|
@ -209,7 +209,7 @@ test "represent an embedded relationship" do
|
|||
fields: [],
|
||||
bot: true,
|
||||
source: %{
|
||||
note: "",
|
||||
note: user.bio,
|
||||
sensitive: false,
|
||||
pleroma: %{}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue