Method: ActionView::Helpers::TagHelper::TagBuilder#content_tag_string

Defined in:
lib/action_view/helpers/tag_helper.rb

#content_tag_string(name, content, options, escape = true) ⇒ Object

:nodoc:



226
227
228
229
230
231
232
233
# File 'lib/action_view/helpers/tag_helper.rb', line 226

def (name, content, options, escape = true) # :nodoc:
  tag_options = tag_options(options, escape) if options

  if escape && content.present?
    content = ERB::Util.unwrapped_html_escape(content)
  end
  "<#{name}#{tag_options}>#{PRE_CONTENT_STRINGS[name]}#{content}</#{name}>".html_safe
end