AccountView: fix for other forms of <br> in bio

Closes: https://git.pleroma.social/pleroma/pleroma/issues/1643
This commit is contained in:
Haelwenn (lanodan) Monnier 2020-03-22 16:38:12 +01:00
commit 15be6ba9c2
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
3 changed files with 7 additions and 6 deletions

View file

@ -115,7 +115,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
fields: user.fields,
bot: bot,
source: %{
note: Pleroma.HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")),
note: (user.bio || "") |> String.replace(~r(<br */?>), "\n") |> Pleroma.HTML.strip_tags(),
sensitive: false,
fields: user.raw_fields,
pleroma: %{