• Hi,
    My script works perfectly but when I put in in the wordpress post the below variable is changed from

    var initialData=”\{\”0name\”:\”Secret\”,\”0brandStatus\”: \”checked\”,\”1name\”:\”OldSpice\”,\”1brandStatus\”: \”checked\”,\”2name\”:\”Degree\”,\”2brandStatus\”: \”checked\”,\”3name\”:\”Dove\”,\”3brandStatus\”: \”checked\”,\”4name\”:\”Axe\”,\”4brandStatus\”: \”checked\”,\”5name\”:\”Maxim\”,\”5brandStatus\”: \”checked\”,\”6name\”:\”Nivea\”,\”6brandStatus\”: \”checked\”,\}” ;

    to

    initialData=”{“0name”:”Secret”,”0brandStatus”: “checked”,”1name”:”OldSpice”,”1brandStatus”: “checked”,”2name”:”Degree”,”2brandStatus”: “checked”,”3name”:”Dove”,”3brandStatus”: “checked”,”4name”:”Axe”,”4brandStatus”: “checked”,”5name”:”Maxim”,”5brandStatus”: “checked”,”6name”:”Nivea”,”6brandStatus”: “checked”,}”;

    How do I make sure the \ is not removed

  • The topic ‘javascript variable data is being changed’ is closed to new replies.