ActionView::Helpers::SanitizeHelper
def strip_links(html)

Description

Returns the string with <a> elements removed.

Arguments

"<a href=\"/x\">Fish</a> & <b>Chips</b>"
Removes <a> elements, keeping their content. Also removes the href attribute from other elements and, as sanitize does, attributes such as a src starting with javascript: and disallowed CSS declarations in style. Does not remove <script> or attributes such as onclick. The returned string is already escaped (& becomes &amp;, etc.), but it is not marked as html_safe, so <%= %> escapes it again.

ERB

Changes from the previous output: Added Removed Changed


          

HTML