FEATURE: Allow Markdown in post notices. (#7864)

This commit is contained in:
Dan Ungureanu
2019-07-09 14:42:02 +03:00
committed by GitHub
parent 6b0cc9e22e
commit 9f5cfa192e
6 changed files with 43 additions and 14 deletions

View File

@ -488,7 +488,7 @@ class PostsController < ApplicationController
if params[:notice].present?
post.custom_fields["notice_type"] = Post.notices[:custom]
post.custom_fields["notice_args"] = params[:notice]
post.custom_fields["notice_args"] = PrettyText.cook(params[:notice], features: { onebox: false })
post.save_custom_fields
else
post.delete_post_notices