From 7788fa2b458b65529de07bbc0e461518818a80e3 Mon Sep 17 00:00:00 2001 From: phl0 Date: Sat, 8 Feb 2025 21:16:33 +0100 Subject: [PATCH] Better replace \r\n\t only after and before the next tag --- application/controllers/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/Api.php b/application/controllers/Api.php index 0dadb9166..f31edad8a 100644 --- a/application/controllers/Api.php +++ b/application/controllers/Api.php @@ -166,7 +166,7 @@ class API extends CI_Controller { // Decode JSON and store $raw = file_get_contents("php://input"); - $raw = $raw = preg_replace('#[\r\n\t]+#', '', $raw); + $raw = $raw = preg_replace('#<([eE][oO][rR])>[\r\n\t]+#', '<$1>', $raw); $obj = json_decode($raw,true); $raw=''; if ($obj === NULL) {