diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 25072a5526..ebe229fa6f 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1272,6 +1272,7 @@ EOF $sAutoReloadSec = (string) $this->iAutoReloadSec; $sTitle = utils::HtmlEntities($this->sTitle); $sFile = utils::HtmlEntities($this->GetDefinitionFile()); + $sFileForJS = json_encode($this->GetDefinitionFile()); $sUrl = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php'; $sReloadURL = $this->GetReloadURL(); @@ -1333,9 +1334,9 @@ $('#dashboard_editor .ui-layout-center').runtimedashboard({ auto_reload: $sAutoReload, auto_reload_sec: $sAutoReloadSec, submit_to: '$sUrl', - submit_parameters: {operation: 'save_dashboard', file: '$sFile', extra_params: $sJSExtraParams, reload_url: '$sReloadURL'}, + submit_parameters: {operation: 'save_dashboard', file: {$sFileForJS}, extra_params: $sJSExtraParams, reload_url: '$sReloadURL'}, render_to: '$sUrl', - render_parameters: {operation: 'render_dashboard', file: '$sFile', extra_params: $sJSExtraParams, reload_url: '$sReloadURL'}, + render_parameters: {operation: 'render_dashboard', file: {$sFileForJS}, extra_params: $sJSExtraParams, reload_url: '$sReloadURL'}, new_dashlet_parameters: {operation: 'new_dashlet'} });