Placeholders with HTML code (Mail Builder)
Some characters, if part of the event data, can lead to problems with mailing display. If, for example, event data contains opening and closing angle brackets (< >
), they would usually be interpreted by Inxmail Commerce as the start or end of HTML code. Normally, however, this is not desired.
For this reason, these characters in event data are automatically HTML escaped in Inxmail Commerce, so that they are not interpreted as HTML code. This ensures that mailings remain correctly displayed.
You can disable automatic HTML escaping by inserting text.unescapeHtml in front of the placeholder and enclosing the placeholder itself in round brackets: ${text.unescapeHtml(
placeholder
)}
The following tables use examples to provide an overview of the results with automatic HTML escaping and its disabling. The characters are listed for the HTML version and the text version of the mailing.
Automatic HTML escaping
With automatic HTML escaping, the syntax of the placeholder remains unchanged: ${placeholder}
Mailing editor |
|
---|---|
Version |
Characters in the editor |
HTML version |
|
Text version |
|
Sent mailing |
||
---|---|---|
Event data |
HTML source code |
Text |
|
|
|
|
|
|
|
|
|
|
|
|
Disabling of automatic HTML escaping
When disabling automatic HTML escaping, you must use the following syntax: ${text.unescapeHtml(placeholder
)}
Mailing editor |
|
---|---|
Version |
Characters in the editor |
HTML version |
|
Text version |
|
Sent mailing |
||
---|---|---|
Event data |
HTML source code |
Text |
|
|
|
|
|
|
|
|
|
|
|
|