Skip to content

Commit ec75487

Browse files
committed
dont double escape on dynaimc
1 parent b8afc9c commit ec75487

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Illuminate/View/Compilers/ComponentTagCompiler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Filesystem\Filesystem;
99
use Illuminate\Support\Str;
1010
use Illuminate\View\AnonymousComponent;
11+
use Illuminate\View\DynamicComponent;
1112
use Illuminate\View\ViewFinderInterface;
1213
use InvalidArgumentException;
1314
use ReflectionClass;
@@ -228,8 +229,10 @@ protected function componentString(string $component, array $attributes)
228229
$parameters = $data->all();
229230
}
230231

232+
$escapeAttributes = $class !== DynamicComponent::class;
233+
231234
return " @component('{$class}', '{$component}', [".$this->attributesToString($parameters, $escapeBound = false).'])
232-
<?php $component->withAttributes(['.$this->attributesToString($attributes->all()).']); ?>';
235+
<?php $component->withAttributes(['.$this->attributesToString($attributes->all(), $escapeAttributes).']); ?>';
233236
}
234237

235238
/**

0 commit comments

Comments
 (0)