HTML in Order Printer templates of Shopify
I am passing some HTML in one of the fields to enhance my order formatting in the Order Printer. There is a problem however. HTML tags aren rendered properly. It looks like that when its rendering tag with HTML intities so < becomes < ; for example.
What's the best way to get it to render HTML in fields? Is there something like an unescape filter?
If anyone is interested I resolved it by URI encoding the string using JS encodeURI before it's sent to Shopify. Then used "decodeURI" filter in the order template
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.