diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2021-01-01 20:12:21 +0100 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2021-01-01 20:12:25 +0100 |
commit | c9a7d3efc61b585d6765bb8e247d6fa1ace9f4fd (patch) | |
tree | db43bdc64131bccb68d3004f1eec11ec28d0d4e2 /ratatoeskr/sys | |
parent | 3a415231d36a48c48f51e1161b11160654961f73 (diff) | |
download | ratatoeskr-cms-c9a7d3efc61b585d6765bb8e247d6fa1ace9f4fd.tar.gz ratatoeskr-cms-c9a7d3efc61b585d6765bb8e247d6fa1ace9f4fd.tar.bz2 ratatoeskr-cms-c9a7d3efc61b585d6765bb8e247d6fa1ace9f4fd.zip |
Some plugins use that function :(.
Diffstat (limited to 'ratatoeskr/sys')
-rw-r--r-- | ratatoeskr/sys/models.php | 1 | ||||
-rw-r--r-- | ratatoeskr/sys/plugin_api.php | 1 | ||||
-rw-r--r-- | ratatoeskr/sys/textprocessors.php | 2 | ||||
-rw-r--r-- | ratatoeskr/sys/translation.php | 1 | ||||
-rw-r--r-- | ratatoeskr/sys/utils.php | 25 |
5 files changed, 30 insertions, 0 deletions
diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index 0716690..5fbc928 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -15,6 +15,7 @@ use r7r\cms\sys\models\KVStorage; use r7r\cms\sys\Database; use r7r\cms\sys\DbTransaction; +require_once(dirname(__FILE__) . "/utils.php"); require_once(dirname(__FILE__) . "/textprocessors.php"); require_once(dirname(__FILE__) . "/pluginpackage.php"); diff --git a/ratatoeskr/sys/plugin_api.php b/ratatoeskr/sys/plugin_api.php index 1920032..468b817 100644 --- a/ratatoeskr/sys/plugin_api.php +++ b/ratatoeskr/sys/plugin_api.php @@ -14,6 +14,7 @@ use r7r\cms\sys\Env; use r7r\cms\sys\textprocessors\LegacyTextprocessor; require_once(dirname(__FILE__) . "/../config.php"); +require_once(dirname(__FILE__) . "/utils.php"); require_once(dirname(__FILE__) . "/models.php"); require_once(dirname(__FILE__) . "/textprocessors.php"); require_once(dirname(__FILE__) . "/../frontend.php"); diff --git a/ratatoeskr/sys/textprocessors.php b/ratatoeskr/sys/textprocessors.php index 288157d..da52043 100644 --- a/ratatoeskr/sys/textprocessors.php +++ b/ratatoeskr/sys/textprocessors.php @@ -13,6 +13,8 @@ use r7r\cms\sys\Env; use r7r\cms\sys\textprocessors\LegacyTextprocessor; use r7r\cms\sys\textprocessors\TextprocessorRepository; +require_once(dirname(__FILE__) . "/utils.php"); + /** * Register a textprocessor. * diff --git a/ratatoeskr/sys/translation.php b/ratatoeskr/sys/translation.php index e5387a1..d9d6cfd 100644 --- a/ratatoeskr/sys/translation.php +++ b/ratatoeskr/sys/translation.php @@ -12,6 +12,7 @@ use r7r\ste; use r7r\cms\sys\Esc; +require_once(dirname(__FILE__) . "/utils.php"); require_once(dirname(__FILE__) . "/init_ste.php"); /** @var ste\STECore $ste */ diff --git a/ratatoeskr/sys/utils.php b/ratatoeskr/sys/utils.php new file mode 100644 index 0000000..8301e9f --- /dev/null +++ b/ratatoeskr/sys/utils.php @@ -0,0 +1,25 @@ +<?php +/* + * File: ratatoeskr/sys/utils.php + * + * Various useful helper functions. + * + * License: + * This file is part of Ratatöskr. + * Ratatöskr is licensed unter the MIT / X11 License. + * See "ratatoeskr/licenses/ratatoeskr" for more information. + */ + +use r7r\cms\sys\Esc; + +/** + * Escape HTML (shorter than htmlspecialchars) + * + * @param mixed $text Input text + * @return string HTML + * @deprecated Use {@see Esc::esc()} instead. + */ +function htmlesc($text): string +{ + return Esc::esc($text); +} |