Add wrapper to do markup_format later on
This commit is contained in:
@@ -3,6 +3,11 @@ require 'net/http'
|
||||
class Messenger
|
||||
include Redmine::I18n
|
||||
|
||||
def self.markup_format(text)
|
||||
# Redmine::WikiFormatting.html_parser.to_text(text)
|
||||
ERB::Util.html_escape(text)
|
||||
end
|
||||
|
||||
def self.default_url_options
|
||||
{ only_path: true, script_name: Redmine::Utils.relative_url_root }
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ module RedmineMessenger
|
||||
|
||||
attachment = {}
|
||||
if description.present? && Messenger.setting_for_project(project, :new_include_description)
|
||||
attachment[:text] = ERB::Util.html_escape(description)
|
||||
attachment[:text] = Messenger.markup_format(description)
|
||||
end
|
||||
attachment[:fields] = [{ title: I18n.t(:field_status),
|
||||
value: ERB::Util.html_escape(status.to_s),
|
||||
@@ -64,7 +64,7 @@ module RedmineMessenger
|
||||
|
||||
attachment = {}
|
||||
if current_journal.notes.present? && Messenger.setting_for_project(project, :updated_include_description)
|
||||
attachment[:text] = ERB::Util.html_escape(current_journal.notes)
|
||||
attachment[:text] = Messenger.markup_format(current_journal.notes)
|
||||
end
|
||||
|
||||
fields = current_journal.details.map { |d| Messenger.detail_to_field d }
|
||||
|
||||
@@ -37,7 +37,7 @@ module RedmineMessenger
|
||||
attachment = nil
|
||||
unless content.comments.empty?
|
||||
attachment = {}
|
||||
attachment[:text] = ERB::Util.html_escape(content.comments.to_s)
|
||||
attachment[:text] = Messenger.markup_format(content.comments.to_s)
|
||||
end
|
||||
|
||||
Messenger.speak(l(:label_messenger_wiki_updated,
|
||||
|
||||
Reference in New Issue
Block a user