Currently, I am utilizing Symfony, and in my controller, I am encountering the following code snippet:
$colors =" test > test2{
color : #fff
}";
return $this->render(
'Default/views/page.html.twig',
array("colors" =>$colors)
);
Within my twig file, I have the following:
<style>
{{ colors }}
</style>
However, I am facing an issue where instead of having the expected >
, I am getting >
, which is causing my styles not to be applied. Interestingly, when I place {{ colors }}
outside of a script
tag, the >
displays correctly.