Skip to content

Commit

Permalink
escape merged attributes by default
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 14, 2020
1 parent 7936725 commit 1c2a9e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ComponentAttributeBag.php
Expand Up @@ -108,6 +108,10 @@ public function merge(array $attributeDefaults = [])
{
$attributes = [];

$attributeDefaults = array_map(function ($value) {
return e($value);
}, $attributeDefaults);

foreach ($this->attributes as $key => $value) {
if ($value === true) {
$attributes[$key] = $key;
Expand Down

0 comments on commit 1c2a9e3

Please sign in to comment.