search for: 9li1hc62

Displaying 1 result from an estimated 1 matches for "9li1hc62".

2006 Jan 18
4
Ruby "htmlentities" replacement: code review please!
...and paste into a CMS from Word. So anyway, given the apparent lack of a function to do this in Rails, and because I''m not particularly impressed with ERB''s html_escape, I decided to do something about it and roll my own. Here''s my code: http://rafb.net/paste/results/9lI1hc62.html It defines a htmlentities function, designed to be included in a helper, or in your environment (that''s what I''m doing with it). Then it overrides the h function to call htmlentities instead of ERB''s html_escape, hopefully meaning you can just drop this in and y...