Output previously buffered content only if the response format is HTML

This commit is contained in:
Kijin Sung 2024-03-24 21:34:07 +09:00
parent 0b9131e664
commit 925ddf9fa0

View file

@ -143,6 +143,12 @@ class DisplayHandler extends Handler
self::$response_size = $this->content_size = strlen($output);
ModuleHandler::triggerCall('display', 'after', $output);
// Output buffered content only if the current page is HTML.
if ($handler instanceof HTMLDisplayHandler)
{
echo $buff;
}
// Output the page content and debug data.
$debug = self::getDebugInfo($output);
print $output;