Categories | Question details Back To List | ||
escaping grid data I load my grid from xml I wrap text in cdata For example gridData = '<rows><row id="23_0"><cell><![CDATA[a'b]]></cell></row></rows>' When I load grid I use mygrid_#{group.id}.parse(gridData); This code fails because of special char ' . How do I handle javascript special char? The following doesn't seem to work. mygrid_#{group.id}.parse(encodeURIComponent(gridData)); Answer posted by Support on Nov 21, 2008 01:46 >>How do I handle javascript special char? The char is not really special , it just breaks the data setting line Will not work gridData = '<rows><row id="23_0"><cell><![CDATA[a'b]]></cell></row></rows>' Will work gridData = "<rows><row id='23_0'><cell><![CDATA[a'b]]></cell></row></rows>" |