module Minidown::Utils

Constants

Regexp

Public Class Methods

escape_html(str) click to toggle source
# File lib/minidown/utils.rb, line 20
def escape_html str
  sanitized_str = str.dup
  sanitized_str.gsub! "<".freeze, "&lt;".freeze
  sanitized_str.gsub! ">".freeze, "&gt;".freeze
  sanitized_str
end