Simply RedDot: "RenderTag to Escape Double Quote and Single Quote"
written by Jian Huang, 8. May 2014
This is a solution posted by Tim Davis on RedDot CMS Users RenderTags caching issue.
You want to assign text placeholder content class a server side preexecution variable, but the text placeholder contains double quote, single quote and carriage return, which will cause preexecution error because the resulting code will be like this
MyVar = "<%txt_body%>"
'this cause syntax error, cannot have unescape quote inside quote
MyVar = "he says,"hello""
'this cause syntax error, cannot unclosed second line
MyVar = "first line
What you can do is to use rendertag to escape the text. This method handles, &, ", ', accented character like (á, é, í, ó, ú, ü, ñ, ¿, ¡), and new line carriage return
MyVar = "<%!! Escape:HtmlEncode(<%txt_body%>) !!%>"
Source: RenderTag to Escape Double Quote and Single Quote
© copyright 2014 by Jian Huang