From 86666db3dfd3160625e72afca0666c3b09994b76 Mon Sep 17 00:00:00 2001 From: Jeffrey Brubaker Date: Thu, 21 Jun 2018 12:49:49 +0300 Subject: [PATCH] Fix Rollbar JS integration that wasn't functional --- Twig/RollbarExtension.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Twig/RollbarExtension.php b/Twig/RollbarExtension.php index d9200d8..ec1799a 100755 --- a/Twig/RollbarExtension.php +++ b/Twig/RollbarExtension.php @@ -48,7 +48,9 @@ public function getFunctions() } return [ - new \Twig_SimpleFunction('rollbarJs', [$this, 'rollbarJs']), + new \Twig_SimpleFunction('rollbarJs', [$this, 'rollbarJs'], [ + 'is_safe' => ['html'], + ]), ]; } @@ -59,7 +61,7 @@ public function rollbarJs() { $helper = new RollbarJsHelper($this->config['rollbar_js']); - $script = ""; + $script = ""; $script = strtr($script, [ '{{config}}' => $helper->configJsTag(), '{{rollbar-snippet}}' => $helper->jsSnippet(),