From: Wim Vanderbauwhede Date: Tue, 24 Apr 2018 12:20:17 +0000 (+0100) Subject: Patch to replace newlines with
tags in bio X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=52ee91efcedb1a004c27e27f252420c1f91f18dc;p=akkoma Patch to replace newlines with
tags in bio --- diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index 6cf8682b8..0ee90496f 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -347,7 +347,8 @@ defmodule Pleroma.Web.TwitterAPI.Controller do def update_profile(%{assigns: %{user: user}} = conn, params) do params = if bio = params["description"] do - Map.put(params, "bio", bio) + bio_brs = Regex.replace(~r/\r\n/,bio,"
") + Map.put(params, "bio", bio_brs) else params end