Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

ampersand in text

Avatar

Level 9

How do I use an ampersand (&) in a text script?

I cannot use "and" because it is a legal name of a company.

"Company & Company"

1 Accepted Solution

Avatar

Correct answer by
Level 10

Just use the unicode sequence '\u0026' to display the ampersand character.

xfa.host.messageBox("Company \u0026 Company");

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Just use the unicode sequence '\u0026' to display the ampersand character.

xfa.host.messageBox("Company \u0026 Company");