From: Wim Vanderbauwhede Date: Tue, 24 Apr 2018 12:28:55 +0000 (+0100) Subject: Changed to support \r\n and \n X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=7517155544f85f0bd085c0ef0dd843fdac1fc4fd;p=akkoma Changed to support \r\n and \n --- diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index 0ee90496f..e8fc9c291 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -347,7 +347,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do def update_profile(%{assigns: %{user: user}} = conn, params) do params = if bio = params["description"] do - bio_brs = Regex.replace(~r/\r\n/,bio,"
") + bio_brs = Regex.replace(~r/\r?\n/,bio,"
") Map.put(params, "bio", bio_brs) else params