Showing
2 changed files
with
3 additions
and
1 deletions
| ... | ... | @@ -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) | ... | ... |