= private = protected
escape(string)
Escapes &, “, > and < in string
# File lib/webrick/htmlutils.rb, line 17 def escape(string) return "" unless string str = string.b str.gsub!(/&/, '&') str.gsub!(/\"/, '"') str.gsub!(/>/, '>') str.gsub!(/</, '<') str.force_encoding(string.encoding) end