diff --git a/src/View/Antlers/Parser.php b/src/View/Antlers/Parser.php index 58ff6c6026..c41d2238d3 100644 --- a/src/View/Antlers/Parser.php +++ b/src/View/Antlers/Parser.php @@ -595,9 +595,15 @@ public function parseCallbackTags($text, $data) } if (! empty($values)) { - // parse the tag found with the value(s) related to it - $tmpname = md5($name); - $replacement = $this->parseVariables("{{ $tmpname }}$content{{ /$tmpname }}", [$tmpname => $values]); + if (Arr::isAssoc($values)) { + $replacement = $this->parse($content, array_merge($data, $values)); + } else { + $values = $this->addLoopIterationVariables($values); + $replacement = collect($values) + ->map(function ($value) use ($content, $data) { + return (string) $this->parse($content, array_merge($data, $value)); + })->join(''); + } } } else { // nope, this must be a callback