stdlib/erb.rb in opal-0.11.4 vs stdlib/erb.rb in opal-1.0.0.beta1
- old
+ new
@@ -4,10 +4,10 @@
module Util
`var escapes = { '&': '&', '<': '<', '>': '>', '"': '"', "'": '''};`
`var escape_regexp = /[&<>"']/g;`
def html_escape(str)
- `return ("" + str).replace(escape_regexp, function (m) { return escapes[m] });`
+ `("" + str).replace(escape_regexp, function (m) { return escapes[m] })`
end
alias h html_escape
module_function :h
module_function :html_escape