From 77940857153f6f9ce2884ef587060f3ee5d05785 Mon Sep 17 00:00:00 2001 From: TJ Draper Date: Tue, 20 Dec 2016 17:50:19 -0600 Subject: [PATCH] Fix an issue where string would not be returned as safe --- autolink/twigextensions/AutoLinkTwigExtension.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autolink/twigextensions/AutoLinkTwigExtension.php b/autolink/twigextensions/AutoLinkTwigExtension.php index 73f4a8b..ac164e2 100644 --- a/autolink/twigextensions/AutoLinkTwigExtension.php +++ b/autolink/twigextensions/AutoLinkTwigExtension.php @@ -75,7 +75,10 @@ public function autolink($content) $content = str_replace($link, $replace, $content); } + // Get the character set + $charset = craft()->templates->getTwig()->getCharset(); + // Return the filtered content - return $content; + return new \Twig_Markup($content, $charset); } }