special characters - How to properly encode ATG commerce JSON taglib droplet response -


i had problem doing jquery $get list of schools. using rqlforeach droplet retrieve list , specified output json, take returned json , use jquery template render out result.

problem seeing following in output king'swhich should've been king's school.

i used {{html schoolname}} supposed take care of decoding correctly. did not....

the solution problem.

problem: encoding , decoding happening twice. first json:object gets output droplet escaping xml. therefore encode & of apostrophe. i.e. reaching client side &amp#39; instead of '. therefore {{hmtl}} not decode correctly

answer: set <json:object escapexml="false"> meant time reaches client side in correct format &#39; decoded jquery {{html }} tag.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -