Use of special characters like variables gets lowercase when compiled
Hi guys,
I want to use external variables like <%=objDoc.firstname%> in the foundation that has both upper and lowercase characters but when it's compiled and inlined ready for production I get <%=objdoc.firstname%> which made everything go lowercase.
I have tried to use {{{raw}}}<%=objDoc.firstname%> {{{/raw}}}} which also returns lowecase.
I am not too sure wheter it's gulp, panini or inky settings that changes lettercase to lowercase and how to prevent that from happening
Please, suggest any ideas.
Hi @teriyaki-89,
did you already try the code from the current develop branch? Can you provide a reproducible testcase as repository?
I have downloaded the current developer branch and testing it there, and to provide reproducible code made a test repository
even when using online tool https://get.foundation/emails/inliner.html the <%=objDoc.firstname%> get compiled into <%=objdoc.firstname%>
The online inliner has not the raw support.
I have downloaded the current developer branch
<%=objDoc.firstname%>compiles to<%=objDoc.firstname%>{{{{raw}}}}<%=objDoc.firstname%>{{{{/raw}}}}compiles again to<%=objDoc.firstname%>
Can you share a repo how you used it? See https://github.com/foundation/foundation-emails-template/blob/master/src/helpers/raw.js
Can you share a repo how you used it? See https://github.com/foundation/foundation-emails-template/blob/master/src/helpers/raw.js
Just created md file with content
<container style="border-radius: 5px;">
<row class="tablePaddingBottom">
<columns large="7" style="height: 100%; vertical-align: top;">
{{{{raw}}}}<%=objDoc.firstname%>{{{{/raw}}}}
</columns>
</row>
</container>
Is that what you meant?
This is not a repository (GitHub project) which we can directly install and start to see the issue.
This is not a repository (GitHub project) which we can directly install and start to see the issue.
Just pushed it all here
I'm not sure why you use the md files. Foundation Emails uses html files and you need the emails-template as described in the readme. The md files are for panini / the docs and do not use the handlebars helpers for html files. So this can not work.
Please read https://github.com/teriyaki-89/checkFoundationVars#getting-started and try the mentioned steps with a html file in the emails-template project.
@teriyaki-89 Not sure if you managed to solve the issue, but {{{{raw}}}} is used to pass values that contain handlebars syntax like {{}}. I recommend you adding your external variable as a handlebar page variable instead. For example under you define the layout to use just add firstname: <%=objDoc.firstname%> and then reference it inside your file as {{firstname}}.
@DanielRuf I have tested the issue on my end and I can confirm that unless you use page variable trick, objDoc is converted to lowercase. It has something to do with <% sign. When you put a space between them - no issue.