1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-24 07:13:08 +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

@@ -517,9 +517,12 @@ class PageRender extends WireData implements Module, ConfigurableModule {
throw new WireException('Missing or non-readable template file: ' . basename($options['filename']));
}
}
if($this->wire('config')->useMarkupRegions) {
$this->populateMarkupRegions($data);
$contentType = $template->contentType;
if(empty($contentType) || stripos($contentType, 'html') !== false) {
$this->populateMarkupRegions($data);
}
}
if($data && $cacheAllowed && $cacheFile) $cacheFile->save($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