Commit 1d958dd9 authored by jonnybradley's avatar jonnybradley

[FIX] modules js: Replace spaces etc with underscores in module names...

[FIX] modules js: Replace spaces etc with underscores in module names (possible in user modules) as they cause parse errors
parent 3d6e75b0
......@@ -18,11 +18,9 @@ header('Expires: ' . gmdate('D, d M Y H:i:s', time()+3600*24*365*10) . ' GMT');
require_once 'tiki-filter-base.php';
$filter = TikiFilter::get('xss');
$filter = TikiFilter::get('alpha');
$_REQUEST['language'] = isset($_GET['language']) ? $_GET['language'] = $filter->filter($_GET['language']) : '';
$cache = "temp/cache/module_ALL_".$_REQUEST['language'];
if ( file_exists($cache) ) {
......@@ -45,7 +43,7 @@ foreach ( $mods as $mod ):
$info = false;
}
?>
tiki_module_params.<?php echo $mod ?> = <?php echo json_encode($info) ?>;
tiki_module_params.<?php echo TikiLib::remove_non_word_characters_and_accents($mod) ?> = <?php echo json_encode($info) ?>;
<?php endforeach;
$content = ob_get_contents();
file_put_contents($cache, $content);
......
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