# ERB::Util (Module)

In: | erb.rb

## Methods

h html_escape u url_encode

## Public Instance methods

html_escape(s)

[Source]

    # File erb.rb, line 446
        def html_escape(s)
          s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;")
        end

h(s)

Alias for html_escape

url_encode(s)

[Source]

    # File erb.rb, line 451
        def url_encode(s)
          s.to_s.gsub(/[^a-zA-Z0-9_\-.]/n){ sprintf("%%%02X", $&.unpack("C")[0]) }
        end

u(s)

Alias for url_encode

[Validate]