From 0585853320d6ded0edb78f9d8dbbe301f1dbe3bf Mon Sep 17 00:00:00 2001 From: Bernard Scaife Date: Tue, 26 Aug 2025 16:06:11 +0000 Subject: [PATCH] Bug 40675: Added new regex to prevent regression I am told my original patch could cause a regression and should instead be $value =~ s/\r\n|\r|\n/ /g; "We probably really want to normalise all options to a space as opposed to switching options. My original change switches us from Mac CR characters to Windows combination of CRLF (and unit tends to just stick to LF in the olden days).. so to really fix the bug we should look for all three as above." --- C4/SIP/Sip.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 0edef706e7..f48a36e97e 100644 --- a/C4/SIP/Sip.pm +++ b/C4/SIP/Sip.pm @@ -97,8 +97,8 @@ sub add_field { ); $value = ''; } - $value =~ s/\r\n/ /g; # CR terminates a sip message - # Protect against them in sip text fields + $value =~ s/\r\n|\r|\n/ /g; # CR terminates a sip message + # Protect against them in sip text fields # Replace any occurrences of the field delimiter in the # field value with the HTML character entity -- 2.39.5