Support locally cached inline images in Articles

This commit is contained in:
Darius Kazemi
2019-04-30 15:29:28 -07:00
parent 615bfe8c16
commit b3e65978b4
4 changed files with 62 additions and 3 deletions

View File

@ -90,6 +90,11 @@ class Formatter
html.html_safe # rubocop:disable Rails/OutputSafety
end
def format_article(text)
text = text.gsub(/>\n+</, "><")
text.html_safe # rubocop:disable Rails/OutputSafety
end
def linkify(text)
html = encode_and_link_urls(text)
html = simple_format(html, {}, sanitize: false)