From 01d9ead55e8eaa83dad240d546dda2debcd88c1c Mon Sep 17 00:00:00 2001
From: kojoty
Date: Sat, 16 Oct 2021 18:16:07 +0200
Subject: [PATCH] Remove purifyHtmlString from OcCookie
This method uses HTMLPurifier to clean up input text with html tags but this is take a lot of memory.
OCCookie can use just htmlspecialchars instead (it saves a half of the memory of each OCPL code call as asmost always OCCookie is in use.
---
src/Utils/Debug/Debug.php | 19 +++++++++++++++++--
src/Utils/Uri/OcCookie.php | 5 +++--
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/Utils/Debug/Debug.php b/src/Utils/Debug/Debug.php
index 2c88554d8d..ed075568f6 100644
--- a/src/Utils/Debug/Debug.php
+++ b/src/Utils/Debug/Debug.php
@@ -1,10 +1,8 @@
$key)) {
if (! $skipPurifying) {
- return UserInputFilter::purifyHtmlString($data->$key);
+ return htmlspecialchars($data->$key);
} else {
return $data->$key;
}