From 429884f0cfca56109d80144b2f6d3dd2409a8827 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 2 Feb 2020 00:04:03 -0300 Subject: [PATCH] Added missing quote character in escaping regexp --- lib/erubis/helpers/rails_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/erubis/helpers/rails_helper.rb b/lib/erubis/helpers/rails_helper.rb index 6e724d9..0ae9ec2 100644 --- a/lib/erubis/helpers/rails_helper.rb +++ b/lib/erubis/helpers/rails_helper.rb @@ -340,7 +340,7 @@ def create_template_source(extension, template, render_symbol, locals) module ERB::Util # :nodoc: ESCAPE_TABLE = { '&'=>'&', '<'=>'<', '>'=>'>', '"'=>'"', "'"=>''', } def h(value) - value.to_s.gsub(/[&<>"]/) {|s| ESCAPE_TABLE[s] } + value.to_s.gsub(/[&<>"']/) {|s| ESCAPE_TABLE[s] } end module_function :h end