Sha256: 0065f19d970d910ccb98d8694e18808802c2a87fe3af6ca34c779adb1ea0f8dc
Contents?: true
Size: 842 Bytes
Versions: 26
Compression:
Stored size: 842 Bytes
Contents
module Ecoportal module API class V2 class Page class Component class RichTextField < Page::Component passthrough :content HTML_TAGS_REX = /<("[^"]*"|'[^']*'|[^'">])*>/ def empty? to_s.to_s.strip.empty? end 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
26 entries across 26 versions & 1 rubygems