When adding contributor-facing labels to your CML elements, there are instances when you may need to use HTML tags in your label's text, or add markup to style your label. Since CML labels do not accept HTML Tags, you will need to use "escape characters". In this article we will explain escape characters and their various uses in CML labels.
What is an escape character?
- An escape character is an alternative version of a symbol. In HTML, there are some characters that are considered reserved (such as less than (<) and greater than (>) signs, which also signify tags) and must be replaced by using the character’s HTML code name or number, so that the character will be read as a regular character and not a reserved HTML character.
- Escape characters will always begin with the ampersand symbol (&) and end with a semicolon symbol (;). The characters in between the ampersand and semicolon make up the specific code name or number for a particular character.
- The specific code name is the entity name and the code number is the entity number. The entity name and entity number are synonymous in most cases, but some browsers may not support all entity names. Some examples of common escape characters are as follows:
|Character||Description||Entity Name||Entity Number|
|Non-breaking space|| || |
When and how do I use escape characters?
The best time to utilize escape characters is when there are reserved characters within HTML tags and in HTML tag labels. Below are some examples of when and how to use escape characters.
*When placing a tag within a tag’s label, change all double quotation marks (“) to single quotation marks (‘)
For further reading, please visit: http://www.w3schools.com/html/html_entities.asp