good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
HTML::Entities not encoding @ or .by punch_card_don (Curate) |
on Feb 12, 2008 at 13:56 UTC ( [id://667561]=perlquestion: print w/replies, xml ) | Need Help?? |
punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
Meaty Monks,
Follow up to this question - my Perl script uses HTML::Entities to encode form input for sql sanitization on fields like fname, lname, email, address1, etc. I asked the question above after noticing that the at-sign (@) and the period (.) were not being encoded. I thought maybe these were not in the default list %char2entity. So I did this (only the pertinent lines shown):
This outputs (looking at the source of the html page returned):
And I get the same result running this by telnet to ensure I'm not looking at interpreted output. The @ and the . are right there in the hash of characters to encode. But they are not encoded. Note that several other characters that I also found in the hash are not encoded, such as [ and ]. What the heck? Thanks. Forget that fear of gravity, Get a little savagery in your life.
Back to
Seekers of Perl Wisdom
|
|