From f48b94d0aaf8f7057b9f37152ae028b49c710f31 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sun, 28 Jan 2018 02:52:32 +0100 Subject: Replace function call "removeLineBreaksAndTabs" with "str_replace" This commit replaces the function call of "removeLineBreaksAndTabs" from "Pagelet::flush()" with the direct call of the "str_replace" function. Therefore, you don't need to include the external function "removeLineBreaksAndTabs" (which was located outside the BigPipe namespace) into your project anymore. --- include/classes/BigPipe/Pagelet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/classes/BigPipe/Pagelet.php b/include/classes/BigPipe/Pagelet.php index 9e145fd..07b7d87 100644 --- a/include/classes/BigPipe/Pagelet.php +++ b/include/classes/BigPipe/Pagelet.php @@ -151,7 +151,7 @@ class Pagelet extends Item { #=============================================================================== public function flush() { if(BigPipe::enabled()) { - $pageletHTML = removeLineBreaksAndTabs($this->getHTML()); + $pageletHTML = str_replace(["\r", "\n", "\t"], '', $this->getHTML()); $pageletHTML = str_replace('--', '--', $pageletHTML); $pageletJSON = json_encode($this->getStructure()); -- cgit v1.2.3