lib/nanoc/helpers/html_escape.rb in nanoc-4.1.1 vs lib/nanoc/helpers/html_escape.rb in nanoc-4.1.2
- old
+ new
@@ -32,18 +32,19 @@
# Append filtered data to buffer
buffer = eval('_erbout', block.binding)
buffer << escaped_data
elsif string
- string.gsub('&', '&')
+ string
+ .gsub('&', '&')
.gsub('<', '<')
.gsub('>', '>')
.gsub('"', '"')
else
raise 'The #html_escape or #h function needs either a ' \
'string or a block to HTML-escape, but neither a string nor a block was given'
end
end
- alias_method :h, :html_escape
+ alias h html_escape
end
end