]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Reply/Quote Function Newline Issue in Internet Explorer (#1362).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 7 Jun 2008 11:42:37 +0000 (11:42 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 7 Jun 2008 11:42:37 +0000 (11:42 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1501 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 682a0cc6b75d737e8efbdc005f790aeff5d0e145..c042a80efc7f0bc8f2f0eaddb95cceda8a90aa10 100644 (file)
@@ -217,10 +217,10 @@ 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("\n", "\n> ") + "\n\n"
+    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"
     render(:update) { |page|
-      page.replace_html "notes", content
+      page.<< "$('notes').value = \"#{content}\";"
       page.show 'update'
       page << "Form.Element.focus('notes');"
       page << "Element.scrollTo('update');"