projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#58] pre-link MFM content (#59)
[akkoma]
/
lib
/
pleroma
/
web
/
common_api
/
utils.ex
diff --git
a/lib/pleroma/web/common_api/utils.ex
b/lib/pleroma/web/common_api/utils.ex
index b6feaf32a6304ac66a37690838cbeb531a27e85a..f5bc3acf553a23ff178934da486c448500eb82a5 100644
(file)
--- 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
"""
@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)
text
|> Formatter.html_escape("text/plain")
|> Formatter.linkify(options)