# encoding: utf-8
module Nanoc3::Helpers
# Contains functionality for HTML-escaping strings.
module HTMLEscape
require 'nanoc3/helpers/capturing'
include Nanoc3::Helpers::Capturing
# Returns the HTML-escaped representation of the given string or the given
# block. Only `&`, `<`, `>` and `"` are escaped. When given a block, the
# contents of the block will be escaped and appended to the output buffer,
# `_erbout`.
#
# @example Escaping a string
#
# h('
')
# # => '<br>'
#
# @example Escaping with a block
#
# <% h do %>
#