Skip to content

Commit 89c07d5

Browse files
committed
fix: change is_safe to html instead of all
1 parent 3d30b7c commit 89c07d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Renderer/TwigExtension.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ public function getFunctions()
5151
{
5252
return [
5353
new TwigFunction('global_namespace_name', [Tree::class, 'getGlobalNamespaceName']),
54-
new TwigFunction('function_path', [$this, 'pathForFunction'], ['needs_context' => true, 'is_safe' => ['all']]),
55-
new TwigFunction('namespace_path', [$this, 'pathForNamespace'], ['needs_context' => true, 'is_safe' => ['all']]),
56-
new TwigFunction('class_path', [$this, 'pathForClass'], ['needs_context' => true, 'is_safe' => ['all']]),
57-
new TwigFunction('method_path', [$this, 'pathForMethod'], ['needs_context' => true, 'is_safe' => ['all']]),
58-
new TwigFunction('property_path', [$this, 'pathForProperty'], ['needs_context' => true, 'is_safe' => ['all']]),
54+
new TwigFunction('function_path', [$this, 'pathForFunction'], ['needs_context' => true, 'is_safe' => ['html']]),
55+
new TwigFunction('namespace_path', [$this, 'pathForNamespace'], ['needs_context' => true, 'is_safe' => ['html']]),
56+
new TwigFunction('class_path', [$this, 'pathForClass'], ['needs_context' => true, 'is_safe' => ['html']]),
57+
new TwigFunction('method_path', [$this, 'pathForMethod'], ['needs_context' => true, 'is_safe' => ['html']]),
58+
new TwigFunction('property_path', [$this, 'pathForProperty'], ['needs_context' => true, 'is_safe' => ['html']]),
5959
new TwigFunction('path', [$this, 'pathForStaticFile'], ['needs_context' => true]),
6060
new TwigFunction(
6161
'abbr_class',
6262
static function ($class, bool $absolute = false) {
6363
return self::abbrClass($class, $absolute);
6464
},
65-
['is_safe' => ['all']]
65+
['is_safe' => ['html']]
6666
),
6767
];
6868
}

0 commit comments

Comments
 (0)