How to prevent hubspot to remove double curly braces automaticaly?


I have custom html module and the folowing code in the template:

<input class=“form-control” format="{{localeDateFormat}}" data-use-native=“false” ng-model=“arrival” data-min-date=“today” data-max-date="{{departure}}">

when I publish the page and view the source I realised that hubspot changes the code as follows:

<input class=“form-control” format="" data-use-native=“false” ng-model=“arrival” data-min-date=“today” data-max-date="">

I tried to change format="{{localeDateFormat}}" it as follows:

format=" & # 123 ; & # 1 23 ; localeDateFormat & # 125; & # 125 ; "

using the html numbers but it didn’t work. Hubspot removes anything that is inside the braces. How can I prevent hubspot to remove the braces automaticaly when I publish the changes in the template?


Hi @Johnny

The HubSpot COS platform treats anything wrapped in {{ }} as a HubL variable. If you need to have the brackets rendered to the page source, you’d need to wrap the code in {% raw %} {% endraw %} tags.

format="{% raw %}{{localeDateFormat}}{% endraw %}"


Thank you so much. It worked. :grin: