Method: YARD::Templates::Helpers::HtmlHelper#h

Defined in:
lib/yard/templates/helpers/html_helper.rb

#h(text) ⇒ String

Escapes HTML entities

Parameters:

  • text (String)

    the text to escape

Returns:

  • (String)

    the HTML with escaped entities


16
17
18
# File 'lib/yard/templates/helpers/html_helper.rb', line 16

def h(text)
  CGI.escapeHTML(text.to_s)
end