Author:
Fluent Commerce
Changed on:
10 Mar 2024
Character escaping and unescaping are crucial for data integrity and security in UX frameworks. This document focuses on the Mustache.js templating engine, which escapes HTML by default to prevent XSS attacks. When special characters like ampersands need to be displayed, the framework offers unescaping methods to ensure correct and secure rendering.
This overview highlights the significance of proper value escaping and the techniques for accurately rendering special characters within the UX framework.
`{{{variable}}}`
`&`
`{{&variable}}`
See the
`PICK&PACK`
`PICK&PACK`
The UX framework templating is based on mustache.js (https://mustache.github.io/)
By default, all variables are HTML-escaped. If you want to render unescaped HTML, use the triple mustache, e.g.
`{{{status}}}`
`&`
`{{&status}}`
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.