Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

jonasbn
  reversethis-{gro.napc} {ta} {nbsanoj}
http://e-diot.dk/
AOL IM: BJonasN (Add Buddy, Send Message)

Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer

and maintainer of:

  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Tuesday August 24, 2004
06:21 AM

Boxing HTML::Entities

[ #20532 ]

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...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.