Plugins - HTML Helpers
Add to favoritesWorking with HTML entities on your views/helpers couldn’t be easier. Just drop this plugin on your vendor/plugins directory are you are done.
Ok, so these are the new helpers available on your views/helpers:
- encode_entities: Encodes a UTF-8 string into a string with HTML entities:
<%= encode_entities(“Über geek”) %> (Outputs Über geek)
- decode_entities: Decodes a string with HTML entities into a UTF-8 string:
<%= decode_entities(”Über geek”) %> (Outputs Über geek)
How to install it:
Check the instructions at http://www.leftbee.net

Found a bug in a regexp. NAMEDENTITYREGEXP in htmlentities.rb does not work for entities containing numbers. Just changed the [a-z] part of the regexp to [a-z0-9] and it seems to work.