engines/adva_cms/vendor/plugins/stringex/lib/lucky_sneaks/string_extensions.rb
def strip_html_tags(leave_whitespace = false)
      name = /[\w:_-]+/
      value = /([A-Za-z0-9]+|('[^']*?'|"[^"]*?"))/
      attr = /(#{name}(\s*=\s*#{value})?)/
      rx = /<[!\/?\[]?(#{name}|--)(\s+(#{attr}(\s+#{attr})*))?\s*([!\/?\]]+|--)?>/
      (leave_whitespace) ?  gsub(rx, "").strip : gsub(rx, "").gsub(/\s+/, " ").strip
    end
# Removes HTML tags from text. This code is simplified from Tobias Luettke's regular expression
# in Typo[http://typosphere.org].
Removes HTML tags from text.
Removes HTML tags from text .
def strip_html_tags(leave_whitespace = false)
      name = /[\w:_-]+/
      value = /([A-Za-z0-9]+|('[^']*?'|"[^"]*?"))/
      attr = /(#{name}(\s*=\s*#{value})?)/
      rx = /<[!\/?\[]?(#{name}|--)(\s+(#{attr}(\s+#{attr})*))?\s*([!\/?\]]+|--)?>/
      (leave_whitespace) ?  gsub(rx, "").strip : gsub(rx, "").gsub(/\s+/, " ").strip
    end
def strip_html_tags ( leave_whitespace = false ) name = / [ \w :_-]+ / value = / ([A-Za-z0-9]+|('[^']*?'|"[^"]*?")) / attr = / ( #{ name } ( \s *= \s * #{ value } )?) / rx = / <[! \/ ? \[ ]?( #{ name } |--)( \s +( #{ attr } ( \s + #{ attr } )*))? \s *([! \/ ? \] ]+|--)?> / ( leave_whitespace ) ? gsub ( rx , "" ) . strip : gsub ( rx , "" ) . gsub ( / \s + / , " " ) . strip end
Removes HTML tags from text.
Removes HTML tags from text .
leave_whitespace