mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-01 11:50:28 +02:00
PHP 8.1: fix various deprecations/errors in newest version of PHP (#310)
* Test on PHP 8.1 * PHP 8.1: fix deprecated NULL param to glob() * PHP 8.1: fix PHP error when passing NULL to rawurlencode() * PHP 8.1: calling ctype_lower with FALSE is deprecated * PHP 8.1: passing NULL to setAttribute() is deprecated * PHP 8.1: passing NULL to str_replace() is an error * PHP 8.1: fix error passing NULL to str_replace() * PHP 8.1: fix return type deprecation with backwards compatible attribute * Revert typo
This commit is contained in:
@@ -306,8 +306,8 @@ class HTMLPurifier_Lexer
|
||||
{
|
||||
// normalize newlines to \n
|
||||
if ($config->get('Core.NormalizeNewlines')) {
|
||||
$html = str_replace("\r\n", "\n", $html);
|
||||
$html = str_replace("\r", "\n", $html);
|
||||
$html = str_replace("\r\n", "\n", (string)$html);
|
||||
$html = str_replace("\r", "\n", (string)$html);
|
||||
}
|
||||
|
||||
if ($config->get('HTML.Trusted')) {
|
||||
|
Reference in New Issue
Block a user