diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index 2f26a0350..6c112c6c5 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -482,7 +482,11 @@ $layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl); $header_script = trim($layout_config->header_script); - if($header_script) $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('"','\\"',$header_script)); + if($header_script) + { + $header_script = str_replace('"','\\"',$header_script); + $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('$','\$',$header_script)); + } $buff = ''; FileHandler::writeFile($cache_file, $buff);