Closed chuyeow closed 14 years ago
The erb monkey patch should convert its argument to a string so that it doesn't unexpectedly try to escape, for example, a Fixnum. An example of this in practice would be a Rails form generated using form helpers like so, with id being a Fixnum:
id
<% form_for ... %> <%= f.hidden_field :id %> <% end %>
A simple change would fix this:
class ERB module Util def html_escape(s) EscapeUtils.escape_html(s.to_s) end end end
Thanks!
Should be fixed here http://github.com/brianmario/escape_utils/commit/b7df7fb6d41323f42e8db43f8ce3fc6fe5a73bca
Will push another release soon.
0.1.4 pushed, closing - reopen if you have trouble
The erb monkey patch should convert its argument to a string so that it doesn't unexpectedly try to escape, for example, a Fixnum. An example of this in practice would be a Rails form generated using form helpers like so, with
id
being a Fixnum:A simple change would fix this:
Thanks!