php - Javascript & character is removed from the code -
i'm working on website first lines of codes this:
header("content-type: text/html; charset=utf-8");
then lines down html starts , in <head>
sections there javascript code included. part of code it's going wrong posted below.
'com/j.php?a='+account_id+'&u='+encodeuricomponent(d.url)+'&r='+math.random());var a=d.creat'
now after page loaded, looks (looking @ source).
'com/j.php?a='+account_id+'u='+encodeuricomponent(d.url)+'r='+math.random());var a=d.creat'
the difference &
characters removed code. , code doesn't work.
i think caused charset utf-8
. can't remove this. how able & characters in javascript?
edit
i tried using <!cdata
, characters not removed now, code still doesn't work.
Comments
Post a Comment