Also add escape exception for menu description

This commit is contained in:
Kijin Sung 2015-09-17 11:55:51 +09:00
parent 7fd1e4dc7d
commit c8d0c2c0a3

View file

@ -547,7 +547,10 @@ class menuAdminController extends menu
{
$args->name = strip_tags(removeHackTag($args->name));
}
if(!preg_match('/^\\$user_lang->[a-zA-Z0-9]+$/', $args->desc))
{
$args->desc = strip_tags(removeHackTag($args->desc));
}
if($request->module_id && strncasecmp('http', $request->module_id, 4) === 0)
{
@ -739,7 +742,10 @@ debugPrint($request);
{
$args->name = strip_tags(removeHackTag($args->name));
}
$args->desc = removeHackTag($args->desc);
if(!preg_match('/^\\$user_lang->[a-zA-Z0-9]+$/', $args->desc))
{
$args->desc = strip_tags(removeHackTag($args->desc));
}
unset($args->group_srls);
$args->open_window = $request->menu_open_window;
@ -823,7 +829,10 @@ debugPrint($request);
{
$itemInfo->name = removeHackTag($itemInfo->name);
}
if(!preg_match('/^\\$user_lang->[a-zA-Z0-9]+$/', $itemInfo->desc))
{
$itemInfo->desc = removeHackTag($itemInfo->desc);
}
$output = executeQuery('menu.updateMenuItem', $itemInfo);