Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

html control codes in post data

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


marcos at fulgentcorp

Jul 24, 2010, 11:09 AM

Post #1 of 3 (431 views)
Permalink
html control codes in post data

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?

thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


adam.prime at utoronto

Jul 24, 2010, 1:52 PM

Post #2 of 3 (400 views)
Permalink
Re: html control codes in post data [In reply to]

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 [at] perl 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 [at] perl
For additional commands, e-mail: dev-help [at] perl


marcos at fulgentcorp

Jul 24, 2010, 2:02 PM

Post #3 of 3 (401 views)
Permalink
Re: html control codes in post data [In reply to]

thanks and sorry for posting in the incorrect area

On Jul 24, 2010, at 3:52 PM, Adam Prime wrote:

> 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 [at] perl 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 [at] perl
> For additional commands, e-mail: dev-help [at] perl
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.