From de86f4b9659fe375a2e9b2afd69ba567969ff875 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 24 Dec 2008 11:35:57 +0000 Subject: [PATCH] Merged r1930 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.7-stable@2173 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redcloth.rb | 2 +- test/unit/helpers/application_helper_test.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/redcloth.rb b/lib/redcloth.rb index 421e5bf01..2b36421d9 100644 --- a/lib/redcloth.rb +++ b/lib/redcloth.rb @@ -1027,7 +1027,7 @@ class RedCloth < String else htmlesc( aftertag, :NoQuotes ) if aftertag and not used_offtags['notextile'] line = "" - @pre_list << "#{ $3 }#{ aftertag }" + @pre_list << "#{ $3.gsub(/<(#{ OFFTAGS })[^>]*>/, '<\\1>') }#{ aftertag }" end elsif $1 and codepre > 0 if codepre - used_offtags.length > 0 diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index bea009e38..5fdf65961 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -146,7 +146,9 @@ class ApplicationHelperTest < HelperTestCase "
\nline 1\nline2
" => "
\nline 1\nline2
", "
content
" => "
<div>content</div>
", "HTML comment: " => "

HTML comment: <!-- no comments -->

", - "