class SafeString < String def to_s self end def to_s_xss_protected self end end class String def mark_as_xss_protected SafeString.new(self) end end class NilClass def mark_as_xss_protected self end end # ERB::Util.h and (include ERB::Util; h) are different methods module ERB::Util class <