Skip to content

Commit

Permalink
dont double escape on dynaimc
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 16, 2020
1 parent b8afc9c commit ec75487
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Illuminate/View/Compilers/ComponentTagCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Str;
use Illuminate\View\AnonymousComponent;
use Illuminate\View\DynamicComponent;
use Illuminate\View\ViewFinderInterface;
use InvalidArgumentException;
use ReflectionClass;
Expand Down Expand Up @@ -228,8 +229,10 @@ protected function componentString(string $component, array $attributes)
$parameters = $data->all();
}

$escapeAttributes = $class !== DynamicComponent::class;

return " @component('{$class}', '{$component}', [".$this->attributesToString($parameters, $escapeBound = false).'])
<?php $component->withAttributes(['.$this->attributesToString($attributes->all()).']); ?>';
<?php $component->withAttributes(['.$this->attributesToString($attributes->all(), $escapeAttributes).']); ?>';
}

/**
Expand Down

0 comments on commit ec75487

Please sign in to comment.