Skip to content

Instantly share code, notes, and snippets.

@brandonkelly
Created September 12, 2013 03:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandonkelly/6532664 to your computer and use it in GitHub Desktop.
Save brandonkelly/6532664 to your computer and use it in GitHub Desktop.
How to protect some text from getting auto-escaped by Twig, without using the raw filter
$charset = craft()->templates->getTwig()->getCharset();
$value = new \Twig_Markup($value, $charset);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment