# Template/Mustache node not encode to html anymore

**URL:** https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654
**Category:** General
**Created:** [27 December 2019 18:02 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654 "2019-12-27T18:02:57Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Andydesjardins](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andydesjardins/32/8556_2.png) [@Andydesjardins](https://discourse.nodered.org/u/Andydesjardins)
#### Post date: [27 December 2019 18:02 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/1 "2019-12-27T18:02:57Z")

</div>

Hello guys,

Is it just me but the template/mustache node doesn't encode special chars to html anymore? It was working previously.

```auto
[{"id":"69d3d7db.2f3468","type":"inject","z":"aacc5666.3ef618","name":"","topic":"","payload":"Été","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":290,"y":280,"wires":[["dcb2c6a1.db85c8"]]},{"id":"dcb2c6a1.db85c8","type":"template","z":"aacc5666.3ef618","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Meilleure saison: {{payload}}","output":"str","x":500,"y":280,"wires":[["1c72896d.111587"]]},{"id":"1c72896d.111587","type":"debug","z":"aacc5666.3ef618","name":"Mustache test","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":280,"wires":[]}]

```

Previously été would be été  
Now it stay é

I think it's since I upgraded to Node-RED 1.0.3

Any idea?

---

<div class="post-metadata">

### Author: ![Andydesjardins](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andydesjardins/32/8556_2.png) [@Andydesjardins](https://discourse.nodered.org/u/Andydesjardins)
#### Post date: [27 December 2019 18:12 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/2 "2019-12-27T18:12:39Z")

</div>

I downgraded to Node-RED 0.20.0. I have the same issue

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [27 December 2019 18:57 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/3 "2019-12-27T18:57:14Z")

</div>

Seems to work OK here... what do you see?

![test](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e6a024e285b75205db4f576236456d0a098f3529.jpeg)

node-RED v1.0.2

---

<div class="post-metadata">

### Author: ![Andydesjardins](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andydesjardins/32/8556_2.png) [@Andydesjardins](https://discourse.nodered.org/u/Andydesjardins)
#### Post date: [27 December 2019 19:05 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/4 "2019-12-27T19:05:24Z")

</div>

Payload should be: "Meilleure saison: été"

As mustache should normally encode to html vars in double {{ }}

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [27 December 2019 19:12 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/5 "2019-12-27T19:12:19Z")

</div>

> [@Andydesjardins](#):
>
> Payload should be: "Meilleure saison: été"

If you are injecting the string `Été` why should the payload include `été`?? (or am I missing something...)

As far as I can see, it works as expected.

---

<div class="post-metadata">

### Author: ![Andydesjardins](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andydesjardins/32/8556_2.png) [@Andydesjardins](https://discourse.nodered.org/u/Andydesjardins)
#### Post date: [27 December 2019 19:19 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/6 "2019-12-27T19:19:25Z")

</div>

Sorry, I didn't realized that to web page (here) itself converts html entities as it should.

Mustache should html encode special chars and é should become & e a c u t e ;

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [27 December 2019 19:27 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/7 "2019-12-27T19:27:09Z")

</div>

Are É & é special characters?

Try injecting `<Été>` into the template, and it will convert it.  
I believe that Mustache only converts certain characters to HTML entities, and probably doesn't include É & é as they don't have a HTML code equivalent.

---

<div class="post-metadata">

### Author: ![Andydesjardins](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andydesjardins/32/8556_2.png) [@Andydesjardins](https://discourse.nodered.org/u/Andydesjardins)
#### Post date: [27 December 2019 19:37 UTC](https://discourse.nodered.org/t/template-mustache-node-not-encode-to-html-anymore/19654/8 "2019-12-27T19:37:06Z")

</div>

Ok, yes... I see, but é is normally a special char.

Thank you Paul-Reed
