Freemarker insert String into Javascript code -
i know how can insert string javascript code in example below:
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "restaurant", "name": "dave's steak house", "address": { "@type": "postaladdress", "streetaddress": "148 w 51st st", "addresslocality": "new york", "addressregion": "ny", "postalcode": "10019", "addresscountry": "us" } } </script> the problem when try insert string between js appears interpreted html code %, &20 etc. have tried ?html, escape, no escape, ?string, ?js_string, etc.
that's string:
{ "@context": "http://schema.org", "@type": "restaurant", "name": "dave's steak house", "address": { "@type": "postaladdress", "streetaddress": "148 w 51st st", "addresslocality": "new york", "addressregion": "ny", "postalcode": "10019", "addresscountry": "us" } } and code:
${mystring}
Comments
Post a Comment