From: Jean-Philippe Lang Date: Sun, 5 Dec 2010 10:09:18 +0000 (+0000) Subject: Fixed: class attribute with spaces on pre tags truncated (#7033). X-Git-Tag: 1.1.0~127 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8841ba97c680fb826b228e8de8a586e61bc428bf;p=redmine.git Fixed: class attribute with spaces on pre tags truncated (#7033). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4468 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb index d720af9d8..7c9df0727 100644 --- a/lib/redcloth3.rb +++ b/lib/redcloth3.rb @@ -1078,7 +1078,7 @@ class RedCloth3 < String line = "" first.match(/<#{ OFFTAGS }([^>]*)>/) tag = $1 - $2.to_s.match(/(class\=\S+)/i) + $2.to_s.match(/(class\=("[^"]+"|'[^']+'))/i) tag << " #{$1}" if $1 @pre_list << "<#{ tag }>#{ aftertag }" end diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 02b15fbf5..6327442c6 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -275,6 +275,9 @@ RAW "