Tech Tip: Inserting HTML via 4DSCRIPT without rendering special characters
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: March 3, 2006
The 4DSCRIPT command used in the HTML code (<!--4DSCRIPT/Method/Var-->) inserts the returned variable $0 into the HTML.
If the $0 variable starts with the char(1), $0 is treated as the HTML code. For example, if the value of the $0 variable is "<Row>", the value inserted into the HTML code will be "<Row>". Since in this case $0 is not defined as an the HTML string, characters such as "<<" are rendered as "<<". To properly insert the "<Row>" HTML tag, $0 must be passed as char(1)+"<Row>".