summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/erb.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c7f16d7093..66d02b9120 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 14 10:38:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
+ passing it to CGI.escapeHTML.
+
Mon Aug 13 13:13:19 2012 Shugo Maeda <shugo@ruby-lang.org>
* lib/erb.rb (ERB::Util.html_escape): use CGI.escape to escape
diff --git a/lib/erb.rb b/lib/erb.rb
index d30911e0f1..26c34ee3ad 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -911,7 +911,7 @@ class ERB
# is a &gt; 0 &amp; a &lt; 10?
#
def html_escape(s)
- CGI.escapeHTML(s)
+ CGI.escapeHTML(s.to_s)
end
alias h html_escape
module_function :h