summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-12 15:12:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-12 15:12:23 +0000
commit054ff0db8ee77fba9c61f38257be997b6d9ba7a3 (patch)
treec851290a015d6c43cade7a1a12026375d9d90804 /lib
parent3dc4dbe302793ae735da15105d713c6d19d2d41e (diff)
downloadredmine-054ff0db8ee77fba9c61f38257be997b6d9ba7a3.tar.gz
redmine-054ff0db8ee77fba9c61f38257be997b6d9ba7a3.zip
Fixed: inline code with less-then/greater-than produces @lt; and @gt; (#1416).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3567 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redcloth3.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/redcloth3.rb b/lib/redcloth3.rb
index 1e3d31ab1..2470fa5a9 100644
--- a/lib/redcloth3.rb
+++ b/lib/redcloth3.rb
@@ -613,7 +613,7 @@ class RedCloth3 < String
text.gsub!( CODE_RE ) do |m|
before,lang,code,after = $~[1..4]
lang = " lang=\"#{ lang }\"" if lang
- rip_offtags( "#{ before }<code#{ lang }>#{ code }</code>#{ after }" )
+ rip_offtags( "#{ before }<code#{ lang }>#{ code }</code>#{ after }", false )
end
end
@@ -1054,7 +1054,7 @@ class RedCloth3 < String
end
end
- def rip_offtags( text )
+ def rip_offtags( text, escape_aftertag=true )
if text =~ /<.*>/
## strip and encode <pre> content
codepre, used_offtags = 0, {}
@@ -1068,7 +1068,7 @@ class RedCloth3 < String
@pre_list.last << line
line = ""
else
- htmlesc( aftertag, :NoQuotes ) if aftertag
+ htmlesc( aftertag, :NoQuotes ) if aftertag && escape_aftertag
line = "<redpre##{ @pre_list.length }>"
$3.match(/<#{ OFFTAGS }([^>]*)>/)
tag = $1