# File lib/web.rb, line 246 def Web.html_encode(string) return nil unless string newstring = string { /&/ => '&' }.each{ |char, entity| newstring.gsub!( char, entity ) } newstring end