I am creating a web application for a client and in order to have the output processed to proper HTML entities I took a look at HTML::Entities, the first run with HTML::Entities, worked better than expected.
Well it actually worked too well. Since I am using CGI::FastTemplate everything is processed through a final print method and this was where I used HTML::Entities. This resulted in HTML where all the HTML had been entityfied...
So I started looking into providing HTML::Entity with a list of characters it should not translate. But apparently the API only supports a list of the characters you want to have translated (or all).
So after pilfering around with the module for some hours I ended up writing a wrapper: HTML::Entities::Simple, since I did not want to spend too much time figuring out how to explain the impact on the API.
HTML::Entities::Simple support a list of characters you do not want to have translated and it does this by manipulating the HTML::Entities char2entity list.
The module works for me, but is very much alpha, it can be found in the Copenhagen Perl Mongers subversion repository - I am not sure it will make it to the CPAN, since I would much rather do or see the change made directly to HTML::Entities, maybe it is time to write a mail to the author - will anyways I need to continue my work on the application to the client...