jlongino has asked for the wisdom of the Perl Monks concerning the following question:
I've only written four Web applications and even then under severe time constraints (which isn't very condusive to tidy code or indepth research), but in at least three of those applications I've encountered the same problem and haven't found a satisfactory solution. The problem is that TEXTAREA fields that contain an apostrophe (´) are truncated or completely obliterated upon submission.
So I guess the question is how should this situation be handled such that the apostrophes are preserved? The last application I wrote intercepted the submission via "onsubmit=" to a js sub, escaped the original TEXTAREA to a hiddent TEXTAREA field and then submitted the form.
It doesn't seem efficient to submit two TEXTAREA fields for each one on a given form. Nor does it seem efficient to create a shadowed hidden form and then submit only the hidden form data. There must be something obvious that I'm overlooking. I doubt that there is a Perl solution since the unescaped field never makes it (intact) to the Perl program once submitted.
Thanks for any advice. If someone could point me in the right direction (code is not necessary but welcome).
--Jim
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (OT) TEXTAREA and the Single Quote
by jlongino (Parson) on Nov 18, 2001 at 05:30 UTC | |
|
Re: (OT) TEXTAREA and the Single Quote
by Trimbach (Curate) on Nov 18, 2001 at 05:23 UTC | |
|
Re: (OT) TEXTAREA and the Single Quote
by hacker (Priest) on Nov 18, 2001 at 03:37 UTC | |
by jlongino (Parson) on Nov 18, 2001 at 03:45 UTC | |
|
Re: (OT) TEXTAREA and the Single Quote
by dws (Chancellor) on Nov 18, 2001 at 03:02 UTC | |
by jlongino (Parson) on Nov 18, 2001 at 03:20 UTC | |
by dws (Chancellor) on Nov 18, 2001 at 06:25 UTC | |
by jlongino (Parson) on Nov 18, 2001 at 08:03 UTC |