A stupid and slighly long introduction
I wrote a pretty small online editor which allows me to easily change a couple of files on my webserver without having the need of using FTP.
Or so I thought.
The editor consists of a small form with a textarea and a submit button (oh and besides, for a little feeling of fake security, there is a password box :) ).
This form gets submitted to a Perl script which gets the form information through use CGI 'param' (because param is the only function of the CGI module I use).
The stupid problem
But the data from the textarea does not equal the data I entered. HTML entities like <, , \ are changed by their actual characters.
A stupid solution
Of course I could write &lt; in the editor (this would then render as < which is what I want) but then I should re-edit any HTML entities any time. As you can see, I don't quite feel like it.
The (stupid?) question
So my actual question(s): why does CGI eat them character entities? And how can I prevent it?
I could of course roll my own form parser, but that's, well, just stupid.
In reply to CGI module seems to eat html entities! by muba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |