Upgrade to 3.6.4
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
##
|
||||
## Bundle of CA Root Certificates
|
||||
##
|
||||
## Certificate data from Mozilla as of: Fri Mar 18 12:29:51 2022 GMT
|
||||
## Certificate data from Mozilla as of: Tue Mar 29 03:12:05 2022 GMT
|
||||
##
|
||||
## This is a bundle of X.509 certificates of public Certificate Authorities
|
||||
## (CA). These were automatically extracted from Mozilla's root certificates
|
||||
@@ -14,7 +14,7 @@
|
||||
## Just configure this file as the SSLCACertificateFile.
|
||||
##
|
||||
## Conversion done with mk-ca-bundle.pl version 1.29.
|
||||
## SHA256: 187ef9dc231135324fe78830cf4462f1ecdeab3e6c9d5e38d623391e88dc5d3c
|
||||
## SHA256: d59c5c83ce7a7635fa95521d8d245677949b86d5574bfcc6f855b6a48f2d5566
|
||||
##
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"description": "The Kirby 3 core",
|
||||
"license": "proprietary",
|
||||
"type": "kirby-cms",
|
||||
"version": "3.6.3.1",
|
||||
"version": "3.6.4",
|
||||
"keywords": [
|
||||
"kirby",
|
||||
"cms",
|
||||
@@ -31,12 +31,12 @@
|
||||
"claviska/simpleimage": "3.6.5",
|
||||
"filp/whoops": "2.14.5",
|
||||
"getkirby/composer-installer": "^1.2.1",
|
||||
"laminas/laminas-escaper": "2.9.0",
|
||||
"laminas/laminas-escaper": "2.10.0",
|
||||
"michelf/php-smartypants": "1.8.1",
|
||||
"phpmailer/phpmailer": "6.5.4",
|
||||
"psr/log": "1.1.4",
|
||||
"symfony/polyfill-intl-idn": "1.24.0",
|
||||
"symfony/polyfill-mbstring": "1.24.0"
|
||||
"symfony/polyfill-intl-idn": "1.25.0",
|
||||
"symfony/polyfill-mbstring": "1.25.0"
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-php72": "*"
|
||||
|
36
kirby/composer.lock
generated
36
kirby/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a83b6521ea01c32fbdce60852c237a74",
|
||||
"content-hash": "c466eb7751b8b96b729b80a221d1641e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "claviska/simpleimage",
|
||||
@@ -175,33 +175,33 @@
|
||||
},
|
||||
{
|
||||
"name": "laminas/laminas-escaper",
|
||||
"version": "2.9.0",
|
||||
"version": "2.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laminas/laminas-escaper.git",
|
||||
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f"
|
||||
"reference": "58af67282db37d24e584a837a94ee55b9c7552be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f",
|
||||
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/58af67282db37d24e584a837a94ee55b9c7552be",
|
||||
"reference": "58af67282db37d24e584a837a94ee55b9c7552be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3 || ~8.0.0 || ~8.1.0"
|
||||
"ext-ctype": "*",
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.4 || ~8.0.0 || ~8.1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"zendframework/zend-escaper": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"infection/infection": "^0.26.6",
|
||||
"laminas/laminas-coding-standard": "~2.3.0",
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"psalm/plugin-phpunit": "^0.12.2",
|
||||
"vimeo/psalm": "^3.16"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "*",
|
||||
"ext-mbstring": "*"
|
||||
"maglnet/composer-require-checker": "^3.8.0",
|
||||
"phpunit/phpunit": "^9.5.18",
|
||||
"psalm/plugin-phpunit": "^0.16.1",
|
||||
"vimeo/psalm": "^4.22.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -233,7 +233,7 @@
|
||||
"type": "community_bridge"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-02T17:10:53+00:00"
|
||||
"time": "2022-03-08T20:15:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/color-extractor",
|
||||
@@ -477,7 +477,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.24.0",
|
||||
"version": "v1.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
@@ -544,7 +544,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -648,7 +648,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.24.0",
|
||||
"version": "v1.25.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
@@ -711,7 +711,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@@ -5,6 +5,7 @@ fields:
|
||||
images:
|
||||
label: field.blocks.gallery.images.label
|
||||
type: files
|
||||
query: model.images
|
||||
multiple: true
|
||||
layout: cards
|
||||
size: tiny
|
||||
|
@@ -13,6 +13,7 @@ fields:
|
||||
image:
|
||||
label: field.blocks.image.name
|
||||
type: files
|
||||
query: model.images
|
||||
multiple: false
|
||||
image:
|
||||
back: black
|
||||
|
@@ -168,7 +168,7 @@ return [
|
||||
* @return \Kirby\Cms\Collection|bool
|
||||
*/
|
||||
'search' => function (App $kirby, Collection $collection, string $query = null, $params = []) {
|
||||
if (empty(trim($query)) === true) {
|
||||
if (empty(trim($query ?? '')) === true) {
|
||||
return $collection->limit(0);
|
||||
}
|
||||
|
||||
|
@@ -69,14 +69,13 @@ return [
|
||||
return $value;
|
||||
}
|
||||
|
||||
$value = trim($value);
|
||||
$converter = $this->converters()[$this->converter()];
|
||||
|
||||
if (is_array($value) === true) {
|
||||
return array_map($converter, $value);
|
||||
}
|
||||
|
||||
return call_user_func($converter, $value);
|
||||
return call_user_func($converter, trim($value ?? ''));
|
||||
},
|
||||
'converters' => function (): array {
|
||||
return [
|
||||
|
@@ -12,7 +12,8 @@ return [
|
||||
'form' => function () {
|
||||
$fields = $this->fields;
|
||||
$disabled = $this->model->permissions()->update() === false;
|
||||
$content = $this->model->content()->toArray();
|
||||
$lang = $this->model->kirby()->languageCode();
|
||||
$content = $this->model->content($lang)->toArray();
|
||||
|
||||
if ($disabled === true) {
|
||||
foreach ($fields as $key => $props) {
|
||||
|
@@ -6,9 +6,16 @@ return [
|
||||
'props' => [
|
||||
/**
|
||||
* The headline for the section. This can be a simple string or a template with additional info from the parent page.
|
||||
* @todo deprecate in 3.7
|
||||
*/
|
||||
'headline' => function ($headline = null) {
|
||||
return I18n::translate($headline, $headline);
|
||||
},
|
||||
/**
|
||||
* label is the new official replacement for headline
|
||||
*/
|
||||
'label' => function ($label = null) {
|
||||
return I18n::translate($label, $label);
|
||||
}
|
||||
],
|
||||
'computed' => [
|
||||
@@ -17,6 +24,10 @@ return [
|
||||
return $this->model()->toString($this->headline);
|
||||
}
|
||||
|
||||
if ($this->label) {
|
||||
return $this->model()->toString($this->label);
|
||||
}
|
||||
|
||||
return ucfirst($this->name);
|
||||
}
|
||||
]
|
||||
|
@@ -396,7 +396,7 @@
|
||||
"next": "Næste",
|
||||
"no": "nej",
|
||||
"off": "Sluk",
|
||||
"on": "Tænd",
|
||||
"on": "Aktiveret",
|
||||
"open": "Åben",
|
||||
"open.newWindow": "Åben i et nyt vindue",
|
||||
"options": "Indstillinger",
|
||||
|
2
kirby/panel/dist/css/style.css
vendored
2
kirby/panel/dist/css/style.css
vendored
File diff suppressed because one or more lines are too long
2
kirby/panel/dist/js/index.js
vendored
2
kirby/panel/dist/js/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -203,12 +203,14 @@ class Blueprint
|
||||
return $props;
|
||||
}
|
||||
|
||||
try {
|
||||
$mixin = static::find($extends);
|
||||
$mixin = static::extend($mixin);
|
||||
$props = A::merge($mixin, $props, A::MERGE_REPLACE);
|
||||
} catch (Exception $e) {
|
||||
// keep the props unextended if the snippet wasn't found
|
||||
foreach (A::wrap($extends) as $extend) {
|
||||
try {
|
||||
$mixin = static::find($extend);
|
||||
$mixin = static::extend($mixin);
|
||||
$props = A::merge($mixin, $props, A::MERGE_REPLACE);
|
||||
} catch (Exception $e) {
|
||||
// keep the props unextended if the snippet wasn't found
|
||||
}
|
||||
}
|
||||
|
||||
// remove the extends flag
|
||||
|
@@ -54,7 +54,7 @@ class Fieldset extends Item
|
||||
$this->editable = $params['editable'] ?? true;
|
||||
$this->icon = $params['icon'] ?? null;
|
||||
$this->model = $this->parent;
|
||||
$this->name = $this->createName($params['name'] ?? Str::ucfirst($this->type));
|
||||
$this->name = $this->createName($params['title'] ?? $params['name'] ?? Str::ucfirst($this->type));
|
||||
$this->label = $this->createLabel($params['label'] ?? null);
|
||||
$this->preview = $params['preview'] ?? null;
|
||||
$this->tabs = $this->createTabs($params);
|
||||
|
@@ -347,6 +347,7 @@ abstract class ModelWithContent extends Model
|
||||
$result = Str::query($query, [
|
||||
'kirby' => $this->kirby(),
|
||||
'site' => is_a($this, 'Kirby\Cms\Site') ? $this : $this->site(),
|
||||
'model' => $this,
|
||||
static::CLASS_ALIAS => $this
|
||||
]);
|
||||
} catch (Throwable $e) {
|
||||
|
@@ -25,7 +25,7 @@ class PageBlueprint extends Blueprint
|
||||
|
||||
// normalize all available page options
|
||||
$this->props['options'] = $this->normalizeOptions(
|
||||
$props['options'] ?? true,
|
||||
$this->props['options'] ?? true,
|
||||
// defaults
|
||||
[
|
||||
'changeSlug' => null,
|
||||
@@ -50,10 +50,10 @@ class PageBlueprint extends Blueprint
|
||||
);
|
||||
|
||||
// normalize the ordering number
|
||||
$this->props['num'] = $this->normalizeNum($props['num'] ?? 'default');
|
||||
$this->props['num'] = $this->normalizeNum($this->props['num'] ?? 'default');
|
||||
|
||||
// normalize the available status array
|
||||
$this->props['status'] = $this->normalizeStatus($props['status'] ?? null);
|
||||
$this->props['status'] = $this->normalizeStatus($this->props['status'] ?? null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -26,7 +26,7 @@ class SiteBlueprint extends Blueprint
|
||||
|
||||
// normalize all available page options
|
||||
$this->props['options'] = $this->normalizeOptions(
|
||||
$props['options'] ?? true,
|
||||
$this->props['options'] ?? true,
|
||||
// defaults
|
||||
[
|
||||
'changeTitle' => null,
|
||||
|
@@ -445,7 +445,7 @@ class System
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
$response = Remote::get('https://licenses.getkirby.com/register', [
|
||||
$response = Remote::get('https://hub.getkirby.com/register', [
|
||||
'data' => [
|
||||
'license' => $license,
|
||||
'email' => Str::lower(trim($email)),
|
||||
|
@@ -30,7 +30,7 @@ class UserBlueprint extends Blueprint
|
||||
|
||||
// normalize all available page options
|
||||
$this->props['options'] = $this->normalizeOptions(
|
||||
$props['options'] ?? true,
|
||||
$this->props['options'] ?? true,
|
||||
// defaults
|
||||
[
|
||||
'create' => null,
|
||||
|
@@ -500,11 +500,7 @@ class Html extends Xml
|
||||
($attr['allowfullscreen'] ?? true) === true
|
||||
) {
|
||||
$attr['allow'] = 'fullscreen';
|
||||
}
|
||||
|
||||
// remove deprecated attribute
|
||||
if (isset($attr['allowfullscreen']) === true) {
|
||||
unset($attr['allowfullscreen']);
|
||||
$attr['allowfullscreen'] = true;
|
||||
}
|
||||
|
||||
return $attr;
|
||||
|
56
kirby/vendor/composer/installed.json
vendored
56
kirby/vendor/composer/installed.json
vendored
@@ -178,36 +178,36 @@
|
||||
},
|
||||
{
|
||||
"name": "laminas/laminas-escaper",
|
||||
"version": "2.9.0",
|
||||
"version_normalized": "2.9.0.0",
|
||||
"version": "2.10.0",
|
||||
"version_normalized": "2.10.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laminas/laminas-escaper.git",
|
||||
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f"
|
||||
"reference": "58af67282db37d24e584a837a94ee55b9c7552be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/891ad70986729e20ed2e86355fcf93c9dc238a5f",
|
||||
"reference": "891ad70986729e20ed2e86355fcf93c9dc238a5f",
|
||||
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/58af67282db37d24e584a837a94ee55b9c7552be",
|
||||
"reference": "58af67282db37d24e584a837a94ee55b9c7552be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3 || ~8.0.0 || ~8.1.0"
|
||||
"ext-ctype": "*",
|
||||
"ext-mbstring": "*",
|
||||
"php": "^7.4 || ~8.0.0 || ~8.1.0"
|
||||
},
|
||||
"conflict": {
|
||||
"zendframework/zend-escaper": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"infection/infection": "^0.26.6",
|
||||
"laminas/laminas-coding-standard": "~2.3.0",
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"psalm/plugin-phpunit": "^0.12.2",
|
||||
"vimeo/psalm": "^3.16"
|
||||
"maglnet/composer-require-checker": "^3.8.0",
|
||||
"phpunit/phpunit": "^9.5.18",
|
||||
"psalm/plugin-phpunit": "^0.16.1",
|
||||
"vimeo/psalm": "^4.22.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "*",
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"time": "2021-09-02T17:10:53+00:00",
|
||||
"time": "2022-03-08T20:15:36+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@@ -495,8 +495,8 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.24.0",
|
||||
"version_normalized": "1.24.0.0",
|
||||
"version": "v1.25.0",
|
||||
"version_normalized": "1.25.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
@@ -529,12 +529,12 @@
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -565,7 +565,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -672,8 +672,8 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.24.0",
|
||||
"version_normalized": "1.24.0.0",
|
||||
"version": "v1.25.0",
|
||||
"version_normalized": "1.25.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
@@ -707,12 +707,12 @@
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
@@ -738,7 +738,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
22
kirby/vendor/composer/installed.php
vendored
22
kirby/vendor/composer/installed.php
vendored
@@ -1,7 +1,7 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'pretty_version' => '3.6.3.1',
|
||||
'version' => '3.6.3.1',
|
||||
'pretty_version' => '3.6.4',
|
||||
'version' => '3.6.4.0',
|
||||
'type' => 'kirby-cms',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -29,8 +29,8 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'getkirby/cms' => array(
|
||||
'pretty_version' => '3.6.3.1',
|
||||
'version' => '3.6.3.1',
|
||||
'pretty_version' => '3.6.4',
|
||||
'version' => '3.6.4.0',
|
||||
'type' => 'kirby-cms',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -47,12 +47,12 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'laminas/laminas-escaper' => array(
|
||||
'pretty_version' => '2.9.0',
|
||||
'version' => '2.9.0.0',
|
||||
'pretty_version' => '2.10.0',
|
||||
'version' => '2.10.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../laminas/laminas-escaper',
|
||||
'aliases' => array(),
|
||||
'reference' => '891ad70986729e20ed2e86355fcf93c9dc238a5f',
|
||||
'reference' => '58af67282db37d24e584a837a94ee55b9c7552be',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/color-extractor' => array(
|
||||
@@ -98,8 +98,8 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
'pretty_version' => 'v1.24.0',
|
||||
'version' => '1.24.0.0',
|
||||
'pretty_version' => 'v1.25.0',
|
||||
'version' => '1.25.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
|
||||
'aliases' => array(),
|
||||
@@ -116,8 +116,8 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.24.0',
|
||||
'version' => '1.24.0.0',
|
||||
'pretty_version' => 'v1.25.0',
|
||||
'version' => '1.25.0.0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
|
@@ -16,22 +16,30 @@
|
||||
"forum": "https://discourse.laminas.dev"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
"sort-packages": true,
|
||||
"platform": {
|
||||
"php": "7.4.99"
|
||||
},
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true,
|
||||
"composer/package-versions-deprecated": true,
|
||||
"infection/extension-installer": true
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.3 || ~8.0.0 || ~8.1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "*",
|
||||
"php": "^7.4 || ~8.0.0 || ~8.1.0",
|
||||
"ext-ctype": "*",
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"infection/infection": "^0.26.6",
|
||||
"laminas/laminas-coding-standard": "~2.3.0",
|
||||
"phpunit/phpunit": "^9.3",
|
||||
"psalm/plugin-phpunit": "^0.12.2",
|
||||
"vimeo/psalm": "^3.16"
|
||||
"maglnet/composer-require-checker": "^3.8.0",
|
||||
"phpunit/phpunit": "^9.5.18",
|
||||
"psalm/plugin-phpunit": "^0.16.1",
|
||||
"vimeo/psalm": "^4.22.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
1877
kirby/vendor/laminas/laminas-escaper/composer.lock
generated
vendored
1877
kirby/vendor/laminas/laminas-escaper/composer.lock
generated
vendored
File diff suppressed because it is too large
Load Diff
@@ -6,10 +6,8 @@ namespace Laminas\Escaper;
|
||||
|
||||
use function bin2hex;
|
||||
use function ctype_digit;
|
||||
use function function_exists;
|
||||
use function hexdec;
|
||||
use function htmlspecialchars;
|
||||
use function iconv;
|
||||
use function in_array;
|
||||
use function mb_convert_encoding;
|
||||
use function ord;
|
||||
@@ -38,7 +36,7 @@ class Escaper
|
||||
* entities that XML supports. Using HTML entities would result in this error:
|
||||
* XML Parsing Error: undefined entity
|
||||
*
|
||||
* @var array
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected static $htmlNamedEntityMap = [
|
||||
34 => 'quot', // quotation mark
|
||||
@@ -67,6 +65,7 @@ class Escaper
|
||||
* Static Matcher which escapes characters for HTML Attribute contexts
|
||||
*
|
||||
* @var callable
|
||||
* @psalm-var callable(array<array-key, string>):string
|
||||
*/
|
||||
protected $htmlAttrMatcher;
|
||||
|
||||
@@ -74,6 +73,7 @@ class Escaper
|
||||
* Static Matcher which escapes characters for Javascript contexts
|
||||
*
|
||||
* @var callable
|
||||
* @psalm-var callable(array<array-key, string>):string
|
||||
*/
|
||||
protected $jsMatcher;
|
||||
|
||||
@@ -81,6 +81,7 @@ class Escaper
|
||||
* Static Matcher which escapes characters for CSS Attribute contexts
|
||||
*
|
||||
* @var callable
|
||||
* @psalm-var callable(array<array-key, string>):string
|
||||
*/
|
||||
protected $cssMatcher;
|
||||
|
||||
@@ -255,7 +256,7 @@ class Escaper
|
||||
* Callback function for preg_replace_callback that applies HTML Attribute
|
||||
* escaping to all matches.
|
||||
*
|
||||
* @param array $matches
|
||||
* @param array<array-key, string> $matches
|
||||
* @return string
|
||||
*/
|
||||
protected function htmlAttrMatcher($matches)
|
||||
@@ -302,7 +303,7 @@ class Escaper
|
||||
* Callback function for preg_replace_callback that applies Javascript
|
||||
* escaping to all matches.
|
||||
*
|
||||
* @param array $matches
|
||||
* @param array<array-key, string> $matches
|
||||
* @return string
|
||||
*/
|
||||
protected function jsMatcher($matches)
|
||||
@@ -325,7 +326,7 @@ class Escaper
|
||||
* Callback function for preg_replace_callback that applies CSS
|
||||
* escaping to all matches.
|
||||
*
|
||||
* @param array $matches
|
||||
* @param array<array-key, string> $matches
|
||||
* @return string
|
||||
*/
|
||||
protected function cssMatcher($matches)
|
||||
@@ -391,32 +392,21 @@ class Escaper
|
||||
}
|
||||
|
||||
/**
|
||||
* Encoding conversion helper which wraps iconv and mbstring where they exist or throws
|
||||
* and exception where neither is available.
|
||||
* Encoding conversion helper which wraps mb_convert_encoding
|
||||
*
|
||||
* @param string $string
|
||||
* @param string $to
|
||||
* @param array|string $from
|
||||
* @throws Exception\RuntimeException
|
||||
* @return string
|
||||
*/
|
||||
protected function convertEncoding($string, $to, $from)
|
||||
{
|
||||
if (function_exists('iconv')) {
|
||||
$result = iconv($from, $to, $string);
|
||||
} elseif (function_exists('mb_convert_encoding')) {
|
||||
$result = mb_convert_encoding($string, $to, $from);
|
||||
} else {
|
||||
throw new Exception\RuntimeException(
|
||||
static::class
|
||||
. ' requires either the iconv or mbstring extension to be installed'
|
||||
. ' when escaping for non UTF-8 strings.'
|
||||
);
|
||||
}
|
||||
$result = mb_convert_encoding($string, $to, $from);
|
||||
|
||||
if ($result === false) {
|
||||
return ''; // return non-fatal blank string on encoding errors from users
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user