Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • webrick/htmlutils.rb

Methods

Class/Module Index [+]

Quicksearch

WEBrick::HTMLUtils

Public Class Methods

escape(string) click to toggle source
 
               # 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