Allow safe HTML in admin menu editor

This commit is contained in:
Kijin Sung 2017-01-31 11:46:03 +09:00
parent 0f9b8cc3d6
commit 3b56c142bd
2 changed files with 2 additions and 3 deletions

View file

@ -1987,7 +1987,7 @@ class menuAdminController extends menu
}
else
{
$name_arr_str .= sprintf('"%s"=>\'%s\',', $key, str_replace(array('\\','\''), array('\\\\','\\\''), strip_tags($val)));
$name_arr_str .= sprintf('"%s"=>\'%s\',', $key, str_replace(array('\\','\''), array('\\\\','\\\''), Rhymix\Framework\Filters\HTMLFilter::clean($val, true)));
}
}
$name_str = sprintf('$_menu_names[%d] = array(%s); %s', $node->menu_item_srl, $name_arr_str, $child_output['name']);

View file

@ -1943,8 +1943,7 @@ jQuery(function($){
$(this).addClass('page');
}
//$(this).find('#menuName').val(htInfo.sText);
$(this).find('#menuName').val(htInfo.sMenuNameKey);
$(this).find('#menuName').val(htInfo.sMenuNameKey.match(/\$user_lang->/) ? htInfo.sMenuNameKey : htInfo.sText);
$(this).find('#menuDesc').val(htInfo.desc);
//menu_name_key