instance method
escape_once
Ruby on Rails 4.1.16
Since v2.2.3Signature
escape_once(html)
Returns an escaped version of html without affecting existing escaped entities.
escape_once("1 < 2 & 3") # => "1 < 2 & 3" escape_once("<< Accept & Checkout") # => "<< Accept & Checkout"
Parameters
-
htmlreq
Source
# File actionview/lib/action_view/helpers/tag_helper.rb, line 128
def escape_once(html)
ERB::Util.html_escape_once(html)
end
Defined in actionview/lib/action_view/helpers/tag_helper.rb line 128
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::TagHelper