I have a redactor field whose HTML contents contain links to other parts of the website.
How do I render variables located in the HTML content of a Redactor field in Twig?
Sample redactor content:
<ul>
<li><a href="{{ siteUrl }}about">About</a></li>
<li><a href="{{ siteUrl }}contact">Contact</a></li>
</ul>
In output of this results in the braces being encoded:
<ul>
<li><a href="%7B%7B%20siteUrl%20%7D%7D/about">About</a></li>
<li><a href="%7B%7B%20siteUrl%20%7D%7D/contact">Contact</a></li>
</ul>
But I want it the output to be whatever siteUrl
is. Eg on localhost:
<ul>
<li><a href="http://localhost/about">About</a></li>
<li><a href="http://localhost/contact">Contact</a></li>
</ul>