Index: vendor/plugins/coderay-0.9.0/lib/coderay/encoders/html.rb =================================================================== --- vendor/plugins/coderay-0.9.0/lib/coderay/encoders/html.rb (revision 3078) +++ vendor/plugins/coderay-0.9.0/lib/coderay/encoders/html.rb (working copy) @@ -25,6 +25,10 @@ # # == Options # + # === :escape + # Escape html entities + # Default: true + # # === :tab_width # Convert \t characters to +n+ spaces (a number.) # Default: 8 @@ -86,6 +90,7 @@ FILE_EXTENSION = 'html' DEFAULT_OPTIONS = { + :escape => true, :tab_width => 8, # :level => :xhtml, # reserved for future use @@ -162,6 +167,7 @@ @HTML_ESCAPE = HTML_ESCAPE.dup @HTML_ESCAPE["\t"] = ' ' * options[:tab_width] + @escape = options[:escape] @opened = [nil] @css = CSS.new options[:style] @@ -245,7 +251,7 @@ # raise 'Token with nil as text was given: %p' % [[text, type]] when String - if text =~ /#{HTML_ESCAPE_PATTERN}/o + if @escape && (text =~ /#{HTML_ESCAPE_PATTERN}/o) text = text.gsub(/#{HTML_ESCAPE_PATTERN}/o) { |m| @HTML_ESCAPE[m] } end @opened[0] = type