讨论区回复引用是html代码
This commit is contained in:
parent
b971147aa8
commit
500b54a466
|
@ -189,16 +189,7 @@ class MessagesController < ApplicationController
|
|||
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
|
||||
@temp = Message.new
|
||||
#@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
|
||||
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
@content_html = textilizable(@content)
|
||||
@temp.content = @content_html
|
||||
#@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> "
|
||||
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||
#@content = "<blockquote>" << @content
|
||||
#@temp = Message.new
|
||||
#@temp.content = @content
|
||||
|
||||
@temp.content = "<blockquote>#{@message.content.html_safe}</blockquote>".html_safe
|
||||
end
|
||||
|
||||
def preview
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
|
||||
$('#quote').val("<%= raw escape_javascript(@content) %>");
|
||||
showAndScrollTo("new_memo", "cke_editor01");
|
|
@ -1,5 +1,5 @@
|
|||
$('#message_subject').val("<%= raw escape_javascript(@subject) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
|
||||
//$('#message_content').val("<#%= raw escape_javascript(@content) %>");
|
||||
$('#quote_quote').html("<%= raw escape_javascript(@content) %>");
|
||||
|
||||
|
|
Loading…
Reference in New Issue