mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Replace PHP 8.2 deprecated mb_convert_encoding() call in Sanitizer
This commit is contained in:
@@ -1671,7 +1671,7 @@ class Sanitizer extends Wire {
|
||||
'outCharset' => 'UTF-8', // output charset
|
||||
'truncateTail' => true, // if truncate necessary for maxLength, remove chars from tail? False to truncate from head.
|
||||
'trim' => true, // trim whitespace from beginning/end, or specify character(s) to trim, or false to disable
|
||||
);
|
||||
);
|
||||
|
||||
static $alwaysReplace = null;
|
||||
$truncated = false;
|
||||
@@ -1682,13 +1682,9 @@ class Sanitizer extends Wire {
|
||||
if($options['maxBytes'] < 0) $options['maxBytes'] = 0;
|
||||
|
||||
if($alwaysReplace === null) {
|
||||
if($this->multibyteSupport) {
|
||||
$alwaysReplace = array(
|
||||
mb_convert_encoding('
', 'UTF-8', 'HTML-ENTITIES') => '', // line-seperator that is sometimes copy/pasted
|
||||
);
|
||||
} else {
|
||||
$alwaysReplace = array();
|
||||
}
|
||||
$alwaysReplace = array(
|
||||
html_entity_decode('
', ENT_QUOTES, 'UTF-8') => '', // line-seperator that is sometimes copy/pasted
|
||||
);
|
||||
}
|
||||
|
||||
if($options['reduceSpace'] !== false && $options['stripSpace'] === false) {
|
||||
|
Reference in New Issue
Block a user