Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more
Escapes &, “, > and < in string
# File webrick/htmlutils.rb, line 17 def escape(string) return "" unless string str = string.dup.force_encoding('binary') str.gsub!(/&/n, '&') str.gsub!(/\"/n, '"') str.gsub!(/>/n, '>') str.gsub!(/</n, '<') str.force_encoding(string.encoding) end