X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fcommon_api%2Futils.ex;h=f5bc3acf553a23ff178934da486c448500eb82a5;hb=5ad256f170c29a864b0f720acc8302b347fd9b25;hp=b6feaf32a6304ac66a37690838cbeb531a27e85a;hpb=28a17c2dc70f33734aceeb499f38cb804489788f;p=akkoma diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index b6feaf32a..f5bc3acf5 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -259,7 +259,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do @doc """ Formatting text to plain text, BBCode, HTML, or Markdown """ - def format_input(text, "text/plain", options) do + def format_input(text, format, options) + when format in ["text/plain", "text/x.misskeymarkdown"] do text |> Formatter.html_escape("text/plain") |> Formatter.linkify(options)