Normalise textarea line endings from CRLF to LF. This also needs to happen in other textareas that support multicode, but we'll start here.

This commit is contained in:
Mike Macgirvin 2024-05-09 19:07:18 +10:00
parent 52e5fc545c
commit 5c73644cb1

View file

@ -892,6 +892,10 @@ class Item extends Controller
$allow_empty = ((($checkin || $checkout) && $haslocation) || $_REQUEST['allow_empty']);
$private = ((isset($private) && $private) ? $private : intval($acl->is_private() || ($public_policy)));
// Normalise the line endings on multi-line fields.
$summary = str_replace("\r\n", "\n", $summary);
$body = str_replace("\r\n", "\n", $body);
// If this is a comment, set the permissions from the parent.
if ($parent_item) {