houdini/lib/format/html.rb

8 lines
183 B
Ruby
Raw Normal View History

module Format
module HTML
def self.has_only_empty_tags(html_str)
return true if html_str && html_str.gsub(/<[^>]*>/ui,'').gsub("&nbsp;", "").strip == ""
end
end
end