diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb index 4d74f326..ceecd85e 100644 --- a/lib/jekyll/converters/markdown/redcarpet_parser.rb +++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb @@ -23,10 +23,17 @@ module Jekyll end module WithoutPygments + require 'cgi' + include CommonMethods + + def code_wrap(code) + "
#{CGI::escapeHTML(code)}
" + end + def block_code(code, lang) lang = lang && lang.split.first || "text" - output = add_code_tags(code, lang) + output = add_code_tags(code_wrap(code), lang) end end