mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 23:31:01 +02:00
Fix issue processwire/processwire-issues#336 where markup regions run on SVG output caused problem
This commit is contained in:
@@ -519,7 +519,10 @@ class PageRender extends WireData implements Module, ConfigurableModule {
|
||||
}
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user