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:
@@ -517,9 +517,12 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
|||||||
throw new WireException('Missing or non-readable template file: ' . basename($options['filename']));
|
throw new WireException('Missing or non-readable template file: ' . basename($options['filename']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->wire('config')->useMarkupRegions) {
|
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);
|
if($data && $cacheAllowed && $cacheFile) $cacheFile->save($data);
|
||||||
@@ -541,7 +544,7 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
|||||||
*/
|
*/
|
||||||
protected function populateMarkupRegions(&$html) {
|
protected function populateMarkupRegions(&$html) {
|
||||||
|
|
||||||
$pos = stripos($html, '<!DOCTYPE');
|
$pos = stripos($html, '<!DOCTYPE html');
|
||||||
|
|
||||||
if($pos === false) {
|
if($pos === false) {
|
||||||
// if no doctype match, attempt an html tag match
|
// if no doctype match, attempt an html tag match
|
||||||
|
Reference in New Issue
Block a user