aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2018-02-03 19:51:05 +0100
committerThomas Lange <code@nerdmind.de>2018-02-03 19:51:05 +0100
commit7601f94af929f909c29da522d9a4b37cecad0a7c (patch)
treea3b5c9a488c667a0888084f4db7516fd524350a7
parent5e1b775028e17cd5ffb0272ff389f5b5758f898b (diff)
downloadbigpipe-7601f94af929f909c29da522d9a4b37cecad0a7c.tar.gz
bigpipe-7601f94af929f909c29da522d9a4b37cecad0a7c.tar.xz
bigpipe-7601f94af929f909c29da522d9a4b37cecad0a7c.zip
Remove the function "removeLineBreaksAndTabs" completely
-rw-r--r--async.php4
-rw-r--r--include/functions.php8
-rw-r--r--index.php2
3 files changed, 1 insertions, 13 deletions
diff --git a/async.php b/async.php
index 8e858df..e8e98da 100644
--- a/async.php
+++ b/async.php
@@ -20,8 +20,6 @@ spl_autoload_register(function($classname) {
require_once sprintf($classpath, $classname);
});
-require_once 'include/functions.php';
-
#===============================================================================
# Check if BigPipe should be disabled
#===============================================================================
@@ -111,7 +109,7 @@ require_once 'include/pagelets.php';
<?php endif;
if(isAsyncRequest()) {
- $BUFFER = removeLineBreaksAndTabs(ob_get_clean());
+ $BUFFER = ob_get_clean();
echo '<script>["Application","BigPipe"].forEach(function(name){window[name] = parent[name];});</script>'."\n";
echo '<script>Application.placeholderHTML('.json_encode($BUFFER).');</script>'."\n\n";
}
diff --git a/include/functions.php b/include/functions.php
deleted file mode 100644
index e920ef1..0000000
--- a/include/functions.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-#===============================================================================
-# Remove line breaks and tabs from a string
-#===============================================================================
-function removeLineBreaksAndTabs($string) {
- return str_replace(["\r", "\n", "\t"], NULL, $string);
-}
-?> \ No newline at end of file
diff --git a/index.php b/index.php
index c47dc90..b2e3a38 100644
--- a/index.php
+++ b/index.php
@@ -9,8 +9,6 @@ spl_autoload_register(function($classname) {
require_once sprintf($classpath, $classname);
});
-require_once 'include/functions.php';
-
#===============================================================================
# Check if BigPipe should be disabled
#===============================================================================