How do I encode/decode HTML entities in Ruby? -
i trying decode html entities, such '<'
becoming '<'
.
i have old gem (html_helpers) seems have been abandoned twice.
any recommendations? need utilize in model.
htmlentities can it:
: jmglov@laurana; sudo gem install htmlentities installed htmlentities-4.2.4 : jmglov@laurana; irb irb(main):001:0> require 'htmlentities' => [] irb(main):002:0> htmlentities.new.decode "¡i'm highly annoyed character references!" => "¡i'm highly annoyed character references!"
html ruby
No comments:
Post a Comment