Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How to Avoid Special Character Conversion ?

Reply
Thread Tools

How to Avoid Special Character Conversion ?

 
 
RobertTG
Guest
Posts: n/a
 
      08-23-2005
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


 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      08-23-2005
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-24-2005

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/
 
Reply With Quote
 
RobertTG
Guest
Posts: n/a
 
      08-24-2005
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 ! ! !



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Avoid having a SQL express for web parts and avoid personalization Roger23 ASP .Net 2 10-12-2006 10:54 PM
Special Character Conversion Lucky ASP .Net 4 03-21-2006 09:38 PM
Special editions and Deluxe special edition dvd question. Rclrk43 DVD Video 8 12-29-2004 07:32 PM
Avoid wasting time or how to avoid initialization Alexander Malkis C++ 8 04-13-2004 11:23 PM



Advertisments