@@ -229,10 +229,13 class IssuesController < ApplicationController | |||||
229 | user = @issue.author |
|
229 | user = @issue.author | |
230 | text = @issue.description |
|
230 | text = @issue.description | |
231 | end |
|
231 | end | |
232 | content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " |
|
232 | # Replaces pre blocks with [...] | |
233 |
|
|
233 | text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]') | |
|
234 | content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> " | |||
|
235 | content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" | |||
|
236 | ||||
234 | render(:update) { |page| |
|
237 | render(:update) { |page| | |
235 | page.<< "$('notes').value = \"#{content}\";" |
|
238 | page.<< "$('notes').value = \"#{escape_javascript content}\";" | |
236 | page.show 'update' |
|
239 | page.show 'update' | |
237 | page << "Form.Element.focus('notes');" |
|
240 | page << "Form.Element.focus('notes');" | |
238 | page << "Element.scrollTo('update');" |
|
241 | page << "Element.scrollTo('update');" |
General Comments 0
You need to be logged in to leave comments.
Login now