Sha256: 1bc6ac7a8f3bc5ca8cc1296e7cb1f0e3e3a929bbd481813455338d6c30958bf8
Contents?: true
Size: 462 Bytes
Versions: 52
Compression:
Stored size: 462 Bytes
Contents
require 'cgi' module JsDuck module Util # Helpers for dealing with HTML class HTML # Strips tags from HTML text def self.strip_tags(html) html.gsub(/<.*?>/, "") end # Escapes HTML, replacing < with < ... def self.escape(html) CGI.escapeHTML(html) end # Unescapes HTML, replacing < with < ... def self.unescape(html) CGI.unescapeHTML(html) end end end end
Version data entries
52 entries across 52 versions & 3 rubygems