Sha256: a68f8ebe61c76e67dda63fa163db1458b371bbe1ef3952179ac2054cb3e8d591
Contents?: true
Size: 542 Bytes
Versions: 5
Compression:
Stored size: 542 Bytes
Contents
module Nanoc::Helpers # Nanoc::Helpers::HTMLEscape contains functionality for HTML-escaping # strings. # # This helper is activated automatically. module HTMLEscape # Returns the HTML-escaped representation of the given string. Only &, <, # > and " are escaped. def html_escape(string) string.gsub('&', '&'). gsub('<', '<'). gsub('>', '>'). gsub('"', '"') end alias h html_escape end end # Include by default include Nanoc::Helpers::HTMLEscape
Version data entries
5 entries across 5 versions & 1 rubygems