FAQ Topic - How do I get a jsp/php variable into client-side javascript? (2010-05-03)

G

Garrett Smith

Ivan said:
No. Unescaping makes sense if data (string) is comming from HTTP POST,
GET or COOKIE and PHP has magic quotes on (which are deprecated from
5.3 version). You can put example without it, developers that has that
configuration option on should know what they need to do first.

http://jibbering.com/faq/#getServerVariable

Updated.

I omitted \u2028 and \u2029 from the PHP example (line separator and
paragraph separator) because PHP does not seem to support such unicode
escape sequences. Sorry, I do not know much of PHP.
 
I

Ivan S

I omitted \u2028 and \u2029 from the PHP example (line separator and
paragraph separator) because PHP does not seem to support such unicode
escape sequences. Sorry, I do not know much of PHP.

I'm not sure, but I think that \u2028 and \u2029 are not special
sequence of characters in PHP (they are regular sequence of
characters) and if you add them as argument to the "addcslashes"
functions, all characters will be escaped one by one and not all of
them as one special character. Maybe I could ask in the PHP news
group?



Ivan
 
G

Garrett Smith

Ivan said:
I'm not sure, but I think that \u2028 and \u2029 are not special
sequence of characters in PHP (they are regular sequence of
characters) and if you add them as argument to the "addcslashes"
functions, all characters will be escaped one by one and not all of
them as one special character. Maybe I could ask in the PHP news
group?
OK.

Looks like php does not support unicode:
<http://www.php.net/manual/en/language.types.string.php>
| ...PHP has no native support of Unicode. See utf8_encode() ...
 

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

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,205
Latest member
ElwoodDurh

Latest Threads

Top