oakbox has asked for the wisdom of the Perl Monks concerning the following question:
So I think, "Aha! I'll use a module to escape those pesky characters into HTML". So I use HTML::Entities decode on my text field inputs.
My problem is that HTML::Entities also escapes HTML characters that I WANT my text entry people to be able to use. I want them to be able to use <p> and <br> to have some basic formatting control.
HTML::Entities allows you to force only some characters to be encoded and to leave others alone. But there's no easy way to complement that list. In other words, there's no function for 'export everything BUT <> in the incoming string'.
I'm hoping you might be able to save me from creating a whole manual lookup table :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: High bit character encoding in HTML
by crenz (Priest) on Apr 21, 2003 at 09:00 UTC | |
by oakbox (Chaplain) on Apr 22, 2003 at 08:00 UTC | |
by iguanodon (Priest) on Apr 21, 2003 at 16:02 UTC | |
by crenz (Priest) on Apr 21, 2003 at 19:10 UTC | |
Re: High bit character encoding in HTML
by PodMaster (Abbot) on Apr 21, 2003 at 08:04 UTC |