1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-24 15:23:11 +02:00

Fix issue processwire/processwire-issues#336 where markup regions run on SVG output caused problem

This commit is contained in:
Ryan Cramer
2017-08-16 10:18:40 -04:00
parent c496c3b859
commit 56345aff26

View File

@@ -519,8 +519,11 @@ class PageRender extends WireData implements Module, ConfigurableModule {
}
if($this->wire('config')->useMarkupRegions) {
$contentType = $template->contentType;
if(empty($contentType) || stripos($contentType, 'html') !== false) {
$this->populateMarkupRegions($data);
}
}
if($data && $cacheAllowed && $cacheFile) $cacheFile->save($data);
$event->return = $data;
@@ -541,7 +544,7 @@ class PageRender extends WireData implements Module, ConfigurableModule {
*/
protected function populateMarkupRegions(&$html) {
$pos = stripos($html, '<!DOCTYPE');
$pos = stripos($html, '<!DOCTYPE html');
if($pos === false) {
// if no doctype match, attempt an html tag match