Inside HTML tags

We recommend using double-quotes (") to encapsulate attribute values inside a tag, and avoid using a single apostrophe character ( ' ) for this where possible.

For example:

Recommended:

<a href="http://example.com/">Link to example</a>
 
"Click Here"
XML

Not recommended:

<a href='http://example.com/'>Link to example</a>
 
'Click Here'
XML

You can in general use an apostrophe ( ' )  anywhere where it is grammatically expected inside a word, but we strongly recommend against using this character as a quote mark in text, as in certain cases, this can cause issues with the CMS 2 processing engine.In displayable text content

You can quote text in your source code either by using:

  • Standard quote character " or it's corresponding HTML entity &quot; that will display as a double quote when rendered in a message or a web page.
  • Smart quote character ` 
  • Apostrophe HTML entity &apos;  which will display an apostrophe when rendered in a message or a web page.

For example:

Recommended:

Quoting is done with double quotes, or using the single quote HTML entity

Check out our new music range "Mozart"
 
Check out our new music range &apos;Mozart&apos;

Not recommended:

Using a direct apostrophe to quote text

Check out our new music range 'Mozart'

Technical Explanation

When an apostrophe is used at end of visible text and before an HTML tag starts (this will be invisible in the rendering), the CMS 2 rendering engine may encounter issues processing and escaping the character that can be used as both a reserved symbol inside an HTML tag, but also as an expected character in a text.

When an apostrophe is present in visible text, but placed just before the opening of an HTML tag  (for example: '< ), this can cause issues where the opening tag symbol <  may be escaped and then the content of the tag and subsequent invisible HTML tags will be rendered as plain text, visible on your message or web page.

To avoid this condition, if you use an actual quote character "  or if you really have to display your text quoted with apostrophes, using the &apos;  there will not be any confusion between code and content in the CMS processing engine.

Note that even if you do not directly see the code case directly through the CMS, if you edit a text field where your text is entered without any HTML markup, internally, this text will be inserted inside HTML tags so this can occur if you end any entered text into the Engage CMS that ends with the apostrophe character, and so by using proper quotes, or replacing the apostrophe with it's HTML entity code will avoid this situation.