|
Posted by Kimmo Laine on 07/07/06 07:26
"Markus Schuster" <schumax@sbox.tugraz.at> wrote in message
news:44ae09cd$0$12384$3b214f66@aconews.univie.ac.at...
> Hi,
>
> I have the following javascript function:
>
> <script type="text/javascript">
>
> function HTMLEncode( text )
> {
> text = text.replace(/&/g, "&") ;
> text = text.replace(/"/g, """) ;
> text = text.replace(/</g, "<") ;
> text = text.replace(/>/g, ">") ;
> text = text.replace(/'/g, "'") ;
>
> return text ;
> }
>
> </script>
>
> Now I want to store the content of 'text' in a php string.
> Is that possible?
Yes, insert the text in an input element that is inside a form and submit
the form to the recieving php page.
By the way, a similar conversion function is available also in php, called
htmlentities.
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
[Back to original message]
|