Method: CGI#esc
- Defined in:
- lib/standard/facets/cgi.rb
#esc(str) ⇒ Object
Return an html “safe” version of the string, where every &, < and > are replaced with appropriate entities.
26 27 28 |
# File 'lib/standard/facets/cgi.rb', line 26 def esc(str) str.gsub(/&/,'&').gsub(/</,'<').gsub(/>/,'>') end |