Method: Ronin::App::Helpers::HTML#hattr

Defined in:
lib/ronin/app/helpers/html.rb

#hattr(text) ⇒ String

Escapes the text as an HTML attribute value.

Parameters:

  • text (String)

    The string to escape.

Returns:

  • (String)

    The escaped HTML attribute.



65
66
67
# File 'lib/ronin/app/helpers/html.rb', line 65

def hattr(text)
  Rack::Utils.escape_path(text.to_s) if text
end