Sha256: 5fe2ebc63d656ec37ca1ec769be054cdda63863acb58121ff030fcebf71f6a00
Contents?: true
Size: 458 Bytes
Versions: 10
Compression:
Stored size: 458 Bytes
Contents
# encoding: utf-8 module Nanoc3::Helpers # Nanoc3::Helpers::HTMLEscape contains functionality for HTML-escaping # strings. 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
Version data entries
10 entries across 10 versions & 1 rubygems