Escaping Objects
If string objects are being used within a Javascript function they MUST be escaped.
Example:
Default AMP template
String object NOT IN a Javascript function doesn’t need escaping:
<div>Found Stuff on {Name}<p></div>
Summary template to display all higher education establishments within 20km
String object WITHIN a javascript function needs escaping:
<div class="FMNSummaryContainer"><i><b><div class="FMNOverlayName"><img src="img/MapPins/MapPinGenericPurple.png" height="18" width="18">These are the Higher Education establishments within 20km:</div></b></i><div class="FMNItemContainer"><repeater {Items} ><div class="FMNItem"><a href="javascript:zoomToFMNItem({OverlayNo}, '{escape(Name)}')" >{Attributes[Institute]}</a></div></repeater></div><p></div>
Send comments on this topic.