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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -