# Problem calling context data from template node \[Solved\]

**URL:** <https://discourse.nodered.org/t/problem-calling-context-data-from-template-node-solved/6056>\
**Category:** General\
**Created:** [22 December 2018 03:23 UTC](https://discourse.nodered.org/t/problem-calling-context-data-from-template-node-solved/6056 "2018-12-22T03:23:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![9886815d5d5c584c03d8](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9886815d5d5c584c03d8/32/5088_2.png) [@9886815d5d5c584c03d8](https://discourse.nodered.org/u/9886815d5d5c584c03d8)\
**Post date:** [22 December 2018 03:23 UTC](https://discourse.nodered.org/t/problem-calling-context-data-from-template-node-solved/6056/1 "2018-12-22T03:23:44Z")

</div>

Hey, I am having trouble recalling context data (a url) from a template node and wondered if anyone else  
has had this problem. I am able to successfully store and recall the context data with function  
nodes but when I call {{flow.url}} from a template node the url gets corrupted like this...

```auto
"https:&#x2F;&#x2F;ifttt.com&#x2F;maker_webhooks?utm_medium&#x3D;Blog&amp;utm_source&#x3D;Updates&amp;utm_campaign&#x3D;Maker_Launch&amp;utm_term&#x3D;&amp;utm_content&#x3D;"

```

I am able to store the data with this...

```auto
var url = "https://ifttt.com/maker_webhooks?utm_medium=Blog&utm_source=Updates&utm_campaign=Maker_Launch&utm_term=&utm_content=";
flow.set("url", url);

var msg = {payload: url};
return msg;

```

I can recall the data with this...

```auto
var url = flow.get("url");
var msg = {payload: url};

return msg;

```

This sample flow reproduces the problem that I'm having with my sequence.

```auto
[{"id":"7d0bfbf5.fd7394","type":"inject","z":"2cafdd25.3078f2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":440,"wires":[["67aad8da.f5b778"]]},{"id":"67aad8da.f5b778","type":"function","z":"2cafdd25.3078f2","name":"set url","func":"var url = \"https://ifttt.com/maker_webhooks?utm_medium=Blog&utm_source=Updates&utm_campaign=Maker_Launch&utm_term=&utm_content=\";\nflow.set(\"url\", url);\n\nvar msg = {payload: url};\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":440,"wires":[["4e48538b.5f3f84"]]},{"id":"4e48538b.5f3f84","type":"template","z":"2cafdd25.3078f2","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{flow.url}}","output":"str","x":460,"y":440,"wires":[["870cfcb1.34446"]]},{"id":"870cfcb1.34446","type":"debug","z":"2cafdd25.3078f2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":650,"y":440,"wires":[]},{"id":"6cdad2d0.fc446c","type":"inject","z":"2cafdd25.3078f2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":500,"wires":[["53bf0e04.f8fb1"]]},{"id":"53bf0e04.f8fb1","type":"function","z":"2cafdd25.3078f2","name":"get url","func":"var url = flow.get(\"url\");\n\nvar msg = {payload: url};\n\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":500,"wires":[["2ff5a4ca.2db824"]]},{"id":"2ff5a4ca.2db824","type":"debug","z":"2cafdd25.3078f2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":650,"y":500,"wires":[]},{"id":"c607efa3.7a64c8","type":"comment","z":"2cafdd25.3078f2","name":"flow.set('url') and flow.get('url')","info":"","x":190,"y":380,"wires":[]}]

```

Any help would be great.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [22 December 2018 07:35 UTC](https://discourse.nodered.org/t/problem-calling-context-data-from-template-node-solved/6056/2 "2018-12-22T07:35:20Z")

</div>

By default, mustache html-escapes values. As described in the sidebar help, you can use `{{{ triple braces }}}` to stop that.

---

<div class="post-metadata">

**Author:** ![9886815d5d5c584c03d8](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9886815d5d5c584c03d8/32/5088_2.png) [@9886815d5d5c584c03d8](https://discourse.nodered.org/u/9886815d5d5c584c03d8)\
**Post date:** [22 December 2018 21:34 UTC](https://discourse.nodered.org/t/problem-calling-context-data-from-template-node-solved/6056/3 "2018-12-22T21:34:03Z")

</div>

Thanks so much, it's working now.
