# Calendar values in a scene and special/accented characters

**URL:** <https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273>\
**Category:** Développement\
**Tags:** calendrier, bug\
**Created:** [June 16, 2026, 1:04pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273 "2026-06-16T13:04:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jean\_bruder](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/jean_bruder/32/13_2.png) [@jean\_bruder](https://community.gladysassistant.com/u/jean_bruder)\
**Post date:** [June 16, 2026, 1:04pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/1 "2026-06-16T13:04:30Z")

</div>

Hello everyone (and everyone else…),

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 16, 2026, 5:50pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/2 "2026-06-16T17:50:30Z")

</div>

Hi @jean_bruder,

Thanks for your feedback!

Actually, it all depends on the calendar source, some tools add special HTML characters in the titles/descriptions.

You’re right, we could remove these special characters to make it cleaner 🙂

@bertrandda I think we could modify `calendar.formaters.js` to decode `name`, `location` and `description`, what do you think?

---

<div class="post-metadata">

**Author:** ![bertrandda](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bertrandda/32/5929_2.png) [@bertrandda](https://community.gladysassistant.com/u/bertrandda)\
**Post date:** [June 25, 2026, 6:04pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/3 "2026-06-25T18:04:53Z")

</div>

Hi,  
I took a quick look and I think I managed to reproduce the issue. Maybe I’m wrong, but I don’t think the problem is with Caldav. It seems that whenever an apostrophe or other special character is in a variable «&nbsp;compiled&nbsp;» by the `Handlebars` library, the library escapes the character.

Example (screenshot below), when I look in the database the apostrophe is alone, if I console.log before the `compile()` the apostrophe is alone as well, but right after in the result if I console.log it adds extra characters.

I proposed a PR, let me know what you think.

> <https://github.com/GladysAssistant/Gladys/pull/2576>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[\] If your changes affect the code, did you write the tests?
> \- \[\] Are tests passing? (\`npm test\` on both front/server)
> \- \[\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[\] If you are adding a new feature/service, did you run the integration comparator? (\`npm run compare-translations\` on front)
> \- \[\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[forum\](https://community.gladysassistant.com/)) for testing before merging.
> \- \[\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!
> 
> https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/2

Here is a screenshot (first message before the fix, second message after the fix)

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/5/8/586d01ed463e16735ad6ec5a1e8a5105992fbb1f.png)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 25, 2026, 6:37pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/4 "2026-06-25T18:37:51Z")

</div>

Thanks for investigating, that looks good to me!

However, I think you can extend this behavior to the other affected areas, otherwise we might encounter the same issue elsewhere 😄

I still see quite a few `Handlebars.compile` instances in the project.

And don’t hesitate to add a small test along the way, that way we ensure the behavior remains stable over time 😉

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 29, 2026, 8:42am UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/5 "2026-06-29T08:42:20Z")

</div>

@bertrandda actually I hadn’t noticed, but it was indeed the case in your PR, I’ve merged it, it will be in the next version of Gladys 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [June 29, 2026, 9:51am UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/6 "2026-06-29T09:51:27Z")

</div>

The fix is available in Gladys Assistant 4.81:

> [@Gladys Assistant 4.81 : Volets roulants, quota IA et Zigbee2MQTT rocket](https://community.gladysassistant.com/t/gladys-assistant-4-81-volets-roulants-quota-ia-et-zigbee2mqtt/10308):
>
> Salut à tous ! La version 4.81.0 est disponible ! rocket Cette mise à jour se concentre surtout sur les volets roulants (IA, Alexa), avec plusieurs améliorations autour de l’IA, de Zigbee2MQTT, et quelques corrections bien utiles au quotidien. window Volets roulants Suite aux retours de la communauté ([IA Gladys et Alexa avec mes volets roulants](https://community.gladysassistant.com/t/ia-gladys-et-alexa-avec-mes-volets-roulants/10299)), les volets et rideaux sont mieux pris en charge : robot IA : ajout d’un nouvel outil device.set-shutter, permettant à l’agent de contrôler v…

---

<div class="post-metadata">

**Author:** ![bertrandda](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/bertrandda/32/5929_2.png) [@bertrandda](https://community.gladysassistant.com/u/bertrandda)\
**Post date:** [June 30, 2026, 6:56pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/7 "2026-06-30T18:56:57Z")

</div>

> [@pierre-gilles](#):
>
> @bertrandda actually I hadn’t noticed, but it was indeed the case in your PR, I’ve merged it, it will be in the next version of Gladys 🙂

No, you were right, the PR wasn’t complete. I added the `noescape` parameter in the remaining Handlebars.compile calls. I also added a test

> <https://github.com/GladysAssistant/Gladys/pull/2588>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[\] If your changes affect the code, did you write the tests?
> \- \[\] Are tests passing? (\`npm test\` on both front/server)
> \- \[\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[\] If you are adding a new feature/service, did you run the integration comparator? (\`npm run compare-translations\` on front)
> \- \[\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[forum\](https://community.gladysassistant.com/)) for testing before merging.
> \- \[\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Add \`noescape\` param for all Handlebars.compile functions to avoid html encoding chars in rendered texts.
> Also added a test on one compile with \`'\`
> 
> https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/4
> 
> 
> 
> \## Summary by CodeRabbit
> 
> \* \*\*Bug Fixes\*\*
> \* Improved rendering of dynamic text and template-based values so special characters, including apostrophes, are preserved correctly.
> \* Fixed several scene actions that use generated content, including messages, HTTP requests, delays, conditions, and device values, to display or send text more reliably.

---

<div class="post-metadata">

**Author:** ![jean\_bruder](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/jean_bruder/32/13_2.png) [@jean\_bruder](https://community.gladysassistant.com/u/jean_bruder)\
**Post date:** [July 3, 2026, 3:05pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/8 "2026-07-03T15:05:27Z")

</div>

Hello @pierre-gilles and @bertrandda 🙂

I can confirm that with version 4.81.0 running on my system, the escaping of special characters is fixed: no more strange things sent in messages and inconsistent event pronunciation now!

Once again, I can only thank you ❤

Jean

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [July 3, 2026, 3:09pm UTC](https://community.gladysassistant.com/t/valeurs-de-calendrier-dans-une-scene-et-caracteres-specaux-accentes/10273/9 "2026-07-03T15:09:07Z")

</div>

Excellent! In the next version of Gladys, we’ll fix this bug in other places because it wasn’t the only one.

Thanks for reporting the bug and thanks to @bertrandda for the fix 😊
