Module: Nexpose::Sanitize

Included in:
AdminCredentials, HostName, IPRange, SmtpAlert, SnmpAlert, SyslogAlert, VulnFilter
Defined in:
lib/nexpose.rb

Instance Method Summary collapse

Instance Method Details

#replace_entities(str) ⇒ Object



59
60
61
62
63
64
65
66
67
# File 'lib/nexpose.rb', line 59

def replace_entities(str)
	ret = str.dup
	ret.gsub!(/&/, "&")
	ret.gsub!(/'/, "'")
	ret.gsub!(/"/, """)
	ret.gsub!(/</, "&lt;")
	ret.gsub!(/>/, "&gt;")
	ret
end