By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

How to Avoid Special Character Conversion ?

P: n/a
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
Aug 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
ASM
RobertTG wrote:
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 ! ! !

--
Stephane Moriaux et son [moins] vieux Mac
Aug 23 '05 #2

P: n/a

RobertTG wrote:
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?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 24 '05 #3

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

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

Aug 24 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.