diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-04-11 14:41:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-04-11 14:41:15 +0000 |
commit | bbb00b0bc48868bf63fd60a5409ea9d11892e0a6 (patch) | |
tree | cbfd89c5596814c020328ab779b4c696d69ab7de /app | |
parent | feac751318108268eab4e390879a9439eff71014 (diff) | |
download | redmine-bbb00b0bc48868bf63fd60a5409ea9d11892e0a6.tar.gz redmine-bbb00b0bc48868bf63fd60a5409ea9d11892e0a6.zip |
Merged r3616 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3652 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 914dc8400..d627f712d 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -223,10 +223,13 @@ class IssuesController < ApplicationController user = @issue.author text = @issue.description end - content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " - content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n" + # Replaces pre blocks with [...] + text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]') + content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> " + content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + render(:update) { |page| - page.<< "$('notes').value = \"#{content}\";" + page.<< "$('notes').value = \"#{escape_javascript content}\";" page.show 'update' page << "Form.Element.focus('notes');" page << "Element.scrollTo('update');" |