title: How do I format a string for use in an inline script rendered as HTML?
body: <p>I have the following properties string</p>
  
  <p><code>GET 50% OFF ANY M'EDIUM OR L"AR"GE PIZZA!</code></p>
  
  <p>I am using it in an HTML onclick markup like so</p>
  
  <p><code>onclick="trackPromoCta(encodeURI(${properties.ctaTwoTextRight @ context='text'}));"</code></p>
  
  <p>However this outputs invalid html. I tried @context of scriptString and that escapes but only for inside JavaScript not for inside HTML markup. I tried all of the other options as well and none of them actually escape special characters for rendering HTML.</p>
  
  <p>I saw someone once use a @format to search the string for these characters and escape them for HTML but I can't find out how to use @format to do this.</p>
  
  <p>The expected output should be </p>
  
  <p><code>onclick="trackPromoCta(encodeURI('GET 50% OFF ANY M&amp;#39;EDIUM OR L&amp;#34;AR&amp;#34;GE PIZZA!'));"</code></p>