mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Fix html render optimization
This commit is contained in:
parent
19afa91ee7
commit
2bb6eeb542
|
|
@ -141,6 +141,12 @@ class Response extends ResponseAbstract implements RenderableInterface
|
|||
}
|
||||
}
|
||||
|
||||
$types = $this->header->get('Content-Type');
|
||||
|
||||
if(stripos($types[0], MimeType::M_HTML) !== false) {
|
||||
return trim(preg_replace('/(\s{2,}|\n)(?![^<>]*<\/pre>)/', ' ', $render));
|
||||
}
|
||||
|
||||
return $render;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user