diff --git a/src/Admin/WorkflowDefinitionExporter.php b/src/Admin/WorkflowDefinitionExporter.php index d3ce0805..abe87c48 100644 --- a/src/Admin/WorkflowDefinitionExporter.php +++ b/src/Admin/WorkflowDefinitionExporter.php @@ -108,9 +108,11 @@ public function export() */ public function format($templateData) { - $viewer = SSViewer::execute_template(['type' => 'Includes', 'WorkflowDefinitionExport'], $templateData); - // Temporary until we find the source of the replacement in SSViewer - $processed = str_replace('&', '&', $viewer ?? ''); + $viewer = SSViewer::create(['type' => 'Includes', 'WorkflowDefinitionExport']); + $viewer->setRewriteHashLinks(false); + $viewer->includeRequirements(false); + // str_replace is temporary until we find the source of the replacement in SSViewer + $processed = str_replace('&', '&', $viewer->process($templateData)); // Clean-up newline "gaps" that SSViewer leaves behind from the placement of template control structures return preg_replace("#^\R+|^[\t\s]*\R+#m", '', $processed ?? ''); }