perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Prime <adam.pr...@utoronto.ca>
Subject Re: html control codes in post data
Date Sat, 24 Jul 2010 20:52:05 GMT
Mark Robinson wrote:
> Hi all,
> 
> my mod_perl 2 handler receives form data. I fetch it using the read_post() function provided
in the API docs. it works well but if the form posts data with tags and such, the fetched
data has html control codes instead.
> for example, if I post the tag "<HTML>", read_post() returns  "%3Chtml%3E" 
> 
> is there anything built into mod_perl 2 to convert this back into the original characters?
> 

Questions like this should to go the users mailing list 
modperl@perl.apache.org.  dev@ is for discussion of the on going 
development of mod_perl.

That said, many people use libapreq2 to handle all incoming post (and 
get) data which will automatically unescape everything nicely for you.

To answer your actual question though, you could use 
Apache2::URI::unescape_url by the looks of things:

http://perl.apache.org/docs/2.0/api/Apache2/URI.html#C_unescape_url_

Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message