Upgrade to 3.6.0
This commit is contained in:
@@ -6,7 +6,6 @@ use Kirby\Cms\Field;
|
||||
use Kirby\Exception\InvalidArgumentException;
|
||||
use Kirby\Exception\NotFoundException;
|
||||
use Kirby\Toolkit\Collection;
|
||||
use Kirby\Toolkit\Escape;
|
||||
use Kirby\Toolkit\Obj;
|
||||
use Kirby\Toolkit\Properties;
|
||||
use Kirby\Toolkit\Query;
|
||||
@@ -103,26 +102,7 @@ class OptionsQuery
|
||||
$value = $value[$object];
|
||||
}
|
||||
|
||||
$result = Str::template($value, $data);
|
||||
|
||||
// escape the default queries for the `text` field
|
||||
// TODO: remove after default escape implemented for query templates in 3.6
|
||||
if ($field === 'text') {
|
||||
$defaults = [
|
||||
'arrayItem' => '{{ arrayItem.value }}',
|
||||
'block' => '{{ block.type }}: {{ block.id }}',
|
||||
'file' => '{{ file.filename }}',
|
||||
'page' => '{{ page.title }}',
|
||||
'structureItem' => '{{ structureItem.title }}',
|
||||
'user' => '{{ user.username }}',
|
||||
];
|
||||
|
||||
if (isset($defaults[$object]) && $value === $defaults[$object]) {
|
||||
$result = Escape::html($result);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return Str::safeTemplate($value, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user