Subject: | Possible problem with multi-line textareas |
Date: | Fri, 16 Mar 2007 14:31:36 +0000 |
To: | bug-WWW-Mechanize [...] rt.cpan.org |
From: | Kake L Pugh <kake [...] earth.li> |
Hello! I don't know if this is a bug in WWW::Mechanize or in me, but
I noticed that Mechanize doesn't seem to be using the right
line-endings for multi-line textareas. Normally this wouldn't really
be noticeable, but I have a web app (OpenGuides, it's on CPAN) that
lets people enter categories one-per-line in a textbox. The CGI
standard is to represent a newline with \r\n (regardless of platform),
so OpenGuides splits on \r\n to get the individual categories.
The problem is that when I use ->submit_form in Mechanize to alter
some data in an edit form that already has a couple of categories
filled in, the categories get mangled from e.g. "Category A",
"Category B" to "Category A%0ACategory B". I think this is because
Mechanize is sending back the data with just \n instead of \r\n.
Anyway, I don't know if this is something you'd like to
address/change, or indeed if it's me being broken, but I thought I'd
let you know.
Can you let me know when you've seen this, please? Just a quick reply
saying "yes, have seen it" is fine; I'm happy to wait for a longer reply.
Thanks for your time!
Kake