|
Posted by Benjamin Niemann on 12/02/06 16:09
Hello,
noah wrote:
> My user needs to cut and paste XML and submit it using a simple HTML
> form.
>
> I have created a textarea:
>
> <textarea rows="10" cols="60" name="xml">
> </textarea>
>
> The problem is the special characters in the XML mess up the submit. I
> need everything pasted to this textarea to be treated like CDATA (I
> think), or somehow full escaped.
>
> Is this possible?
Whatever the user types or pastes into the textarea is submitted unchanged
to the server (except for some encoding issues).
The 'messing up' probably happends later down in the processing pipeline.
What are you doing with the submitted data?
Do you want to (re-)display the textarea, prefilled with the previously
submitted data? In this case you have to escape all '<' and '&' in the data
between the textarea start and end tags.
Same thing, if you want to display the XML literally in a HTML document.
HTH
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Navigation:
[Reply to this message]
|