0

I have a html template with a string that's translated. The translation contains a html a tag. but the tag is printed as text when rendered.

.html file content:

<p>{{trans "footer_link_privacy"}}</p>

en_US.csv content:

"footer_link_privacy", "<a href=""/en/privacy-policy"">Privacy Policy</a>"

1 Answer 1

1

try with

{{trans "footer_link_privacy"|raw}}
3
  • Lol, it never even occurred to me that this was twig. thanx man! Sep 3, 2020 at 14:25
  • Is there equivalent raw filter in knockoutjs to use in html template?
    – Laxman
    Feb 23, 2023 at 14:13
  • try with this <span data-bind="html: functionNameHere()"></span>
    – Marius
    Feb 23, 2023 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.