Commit 80a2f540 authored by Jonny Bradley's avatar Jonny Bradley

[FIX] diagram: Template literals (enclosed in `backticks`) are not supported...

[FIX] diagram: Template literals (enclosed in `backticks`) are not supported in IE sadly, so use normal single quotes and replace new lines (and multiple spaces) with a single space.
parent e0a880ca
Pipeline #49603300 failed with stages
in 24 minutes and 45 seconds
......@@ -66,6 +66,8 @@ function wikiplugin_diagram($data, $params)
}
}
$data = preg_replace('/\s+/', ' ', $data);
if (function_exists('simplexml_load_string')) {
$doc = simplexml_load_string($data);
if (empty($data) || $doc === false || ($doc->getName() != 'mxGraphModel' && $doc->getName() != 'mxfile')) {
......
......@@ -16,7 +16,7 @@
</div>
{/if}
{jq notonready=true}
var xml = `{{$graph_data}}`;
var xml = '{{$graph_data}}';
mxUtils.getAll([STYLE_PATH + '/default.xml'], function(xhr) {
var themes = new Object();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment