<!-- We use GitHub only for bug reports 🐛 Anything else should be a discussion: https://github.com/getredash/redash/discussions/ 👫 🚨For support, help & questions use https://github.com/getredash/redash/discussions/categories/q-a 💡For feature requests & ideas use https://github.com/getredash/redash/discussions/categories/ideas **Found a security vulnerability?** Please email security@redash.io to report any security vulnerabilities. We will acknowledge receipt of your vulnerability and strive to send you regular updates about our progress. If you're curious about the status of your disclosure please feel free to email us again. If you want to encrypt your disclosure email, you can use this PGP key. --> ### Issue Summary When using alert template macro (ex: `{{QUERY_RESULT_ROWS}}`, [cf](https://redash.io/help/user-guide/alerts/custom-alert-notifications)) in alert body, the result is HTML escaped and its JSON format is broken like this: ``` [{'column': 1}] ``` ### Steps to Reproduce - https://github.com/getredash/redash/blob/master/redash/models/__init__.py#L1039 - https://github.com/getredash/redash/blob/master/redash/utils/__init__.py#L139-L141 When rendering alert template, `mustache_render` should be used, not `mustache_render_escape`. ### Technical details: * Redash Version: 24.12.0-dev I guess this problem caused by #5996 (Version: 23.09.0)