Fix update manifest json

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-28 19:18:06 +01:00
parent d71fe80ed7
commit 089a935e1c

View File

@ -3936,8 +3936,10 @@ if ($action == 'editcss') {
// Clean the manifestjson file to remove php code and get only html part
$manifestjsoncontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $manifestjsoncontent);
} else {
$manifestjsoncontent = GETPOST('WEBSITE_MANIFEST_JSON', 'restricthtml');
$manifestjsoncontent = trim(GETPOST('WEBSITE_MANIFEST_JSON', 'restricthtmlallowunvalid'));
$manifestjsoncontent = str_replace('<?=', '<?php', $manifestjsoncontent);
}
//if (!trim($manifestjsoncontent)) {
//$manifestjsoncontent.="";
//}