From 03acb773060807e113d9895b08c9af787f343cc3 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 8 Jul 2022 12:13:59 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#1595 --- wire/core/Sanitizer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wire/core/Sanitizer.php b/wire/core/Sanitizer.php index e9343bf5..25686710 100644 --- a/wire/core/Sanitizer.php +++ b/wire/core/Sanitizer.php @@ -1774,6 +1774,8 @@ class Sanitizer extends Wire { $options = array_merge($defaults, $options); $newline = $options['newline']; $value = $this->string($value); + + if(!is_string($newline) || !strlen($newline)) $newline = ' '; if(strpos($value, "\r") !== false) { // normalize newlines