mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 21:12:15 +09:00
Remove leading whitespace from displayed response
This commit is contained in:
parent
908fd98270
commit
f00d6c7e19
1 changed files with 4 additions and 2 deletions
|
|
@ -131,11 +131,13 @@ class DisplayHandler extends Handler
|
||||||
header('X-Robots-Tag: noindex');
|
header('X-Robots-Tag: noindex');
|
||||||
}
|
}
|
||||||
|
|
||||||
// flush output buffer
|
// Flush the output buffer, and remove unnecessary whitespace at the beginning.
|
||||||
|
$buff = '';
|
||||||
while (ob_get_level())
|
while (ob_get_level())
|
||||||
{
|
{
|
||||||
ob_end_flush();
|
$buff .= ob_get_clean();
|
||||||
}
|
}
|
||||||
|
$buff = ltrim($buff, "\n\r\t\v\x00\x20\u{FEFF}");
|
||||||
|
|
||||||
// call a trigger after display
|
// call a trigger after display
|
||||||
self::$response_size = $this->content_size = strlen($output);
|
self::$response_size = $this->content_size = strlen($output);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue