Upgrade to 4.4.0
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use Kirby\Toolkit\I18n;
|
||||
use Kirby\Toolkit\Str;
|
||||
use Kirby\Uuid\Uuids;
|
||||
|
||||
return [
|
||||
'props' => [
|
||||
@@ -75,7 +76,11 @@ return [
|
||||
* @param string $store 'uuid'|'id'
|
||||
*/
|
||||
'store' => function (string $store = 'uuid') {
|
||||
return Str::lower($store);
|
||||
// fall back to ID, if UUIDs globally disabled
|
||||
return match (Uuids::enabled()) {
|
||||
false => 'id',
|
||||
default => Str::lower($store)
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
|
@@ -23,7 +23,11 @@ return [
|
||||
$uploads = [];
|
||||
}
|
||||
|
||||
$uploads['accept'] = '*';
|
||||
$uploads['accept'] = '*';
|
||||
|
||||
if ($preview = $this->image) {
|
||||
$uploads['preview'] = $preview;
|
||||
}
|
||||
|
||||
if ($template = $uploads['template'] ?? null) {
|
||||
// get parent object for upload target
|
||||
|
@@ -63,7 +63,14 @@ return [
|
||||
'computed' => [
|
||||
'value' => function () {
|
||||
$value = trim($this->value ?? '');
|
||||
return Sane::sanitize($value, 'html');
|
||||
$value = Sane::sanitize($value, 'html');
|
||||
|
||||
// convert non-breaking spaces to HTML entity
|
||||
// as that's how ProseMirror handles it internally;
|
||||
// will allow comparing saved and current content
|
||||
$value = str_replace(' ', ' ', $value);
|
||||
|
||||
return $value;
|
||||
}
|
||||
],
|
||||
'validations' => [
|
||||
|
Reference in New Issue
Block a user