Commit 25d69c42762314cefc1cd815f607cec421a93252

Authored by Andrey Karpikov
1 parent 6bb07f97

escape html for pre and code

... ... @@ -377,11 +377,13 @@ module Kanjai
377 377 if !key.nil? and !value.nil?
378 378 work_value = value.dup
379 379 work_value.gsub!(/\r\n/, "#newline#") if !['code', 'pre'].include?(parent_node_name.to_s.downcase)
  380 + work_value = CGI::escapeHTML(work_value) if ['code', 'pre'].include?(parent_node_name.to_s.downcase)
380 381 new_text.gsub!(key, work_value.to_s.html_safe)
381 382 end
382 383 end
383 384 end
384 385 new_text
  386 +
385 387 end
386 388
387 389 def self.replace_attributes_marker(attributes, hash_value)
... ...
1 1 module Kanjai
2   - VERSION = "0.0.371"
  2 + VERSION = "0.0.372"
3 3 end
... ...