# File lib/kramdown/utils/html.rb, line 38 def entity_to_str(e, original = nil) if RUBY_VERSION >= '1.9' && @options[:entity_output] == :as_char && (c = e.char.encode(@root.options[:encoding]) rescue nil) && !ESCAPE_MAP.has_key?(c) c elsif (@options[:entity_output] == :as_input || @options[:entity_output] == :as_char) && original original elsif @options[:entity_output] == :numeric || e.name.nil? "&##{e.code_point};" else "&#{e.name};" end end