Sha256: cad652cd9b303740dcd0364596b7686142edafeec8526c12edca7bc0e18f592c
Contents?: true
Size: 761 Bytes
Versions: 16
Compression:
Stored size: 761 Bytes
Contents
module Ecoportal module API class V2 class Page class Component class RichTextField < Page::Component passthrough :content HTML_TAGS_REX = /<("[^"]*"|'[^']*'|[^'">])*>/ def to_s remove_html_tags(content) end private def remove_html_tags(str) str = str.gsub(HTML_TAGS_REX, ' ') if str str = str.gsub(/[^[:print:]]/, '') if str str = str.gsub(": ", ' ') if str str = str.gsub(""", '"') if str str = str.gsub("&", '&') if str str end end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems