public Method

HTMLUtils.escape(string)

There's no documentation for this item.

Source Code

# File webrick/htmlutils.rb, line 14
def escape(string)
  str = string ? string.dup : ""
  str.gsub!(/&/n, '&')
  str.gsub!(/\"/n, '"')
  str.gsub!(/>/n, '>')
  str.gsub!(/</n, '&lt;')
  str
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.