How to Avoid Special Character Conversion ?

R

RobertTG

Value entered in textarea is: "this "TEST" is not going well"

JS sends to server this value: "this "TEST" is not going well"

How to force JS not to convert the string ? I want JS to send exactly what
is typed in the form controls.
Is there a function to call ?
Thx
 
A

ASM

RobertTG said:
Value entered in textarea is: "this "TEST" is not going well"

JS sends to server this value: "this "TEST" is not going well"

yes but inverse convertion would be done automaticaly
How to force JS not to convert the string ?

does it JS who convert the string ?
do :
alert(document.form1.myTextarea.value)
to see
or your browser ?

do you use a doctype on your page
if yes, wich one ?
do you have a meta caractere-encoding ?
wich one ?
try to use a charset-encoding : utf-8

if JS html-entities encodes your string(*), try :
text = unescape(document.form1.myTextarea.value)


(*) I would be very surprised JS converts in html-entities ! ! !
 
M

Martin Honnen

RobertTG said:
Value entered in textarea is: "this "TEST" is not going well"

JS sends to server this value: "this "TEST" is not going well"

What JS code do you use to send something to the server? And what are
you using on the server to check out the data sent?
 
R

RobertTG

Thanks ! you're right !
I cried wolf - turns out it was server-side that performed the escape.

"ASM"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top