mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
new function> escapeHtml + fix css in admin menus
This commit is contained in:
parent
fa9f7aab7c
commit
60a854e5fd
@ -89,7 +89,7 @@ if (isset($_REQUEST['template'])) {
|
||||
if (isset($menus[$id])) {
|
||||
$i = 0;
|
||||
foreach ($menus[$id] as $menu) {
|
||||
echo '<li class="ui-state-default" id="list-' . $id . '-' . $i . '"><label>Name:</label><input type="text" name="menu[' . $id . '][]" value="' . $menu['name'] . '"/>
|
||||
echo '<li class="ui-state-default" id="list-' . $id . '-' . $i . '"><label>Name:</label><input type="text" name="menu[' . $id . '][]" value="' . escapeHtml($menu['name']) . '"/>
|
||||
<label>Link:</label><input type="text" name="menu_link[' . $id . '][]" value="' . $menu['link'] . '"/>
|
||||
<input type="hidden" name="menu_blank[' . $id . '][]" value="0" />
|
||||
<label><input class="blank-checkbox" type="checkbox" ' . ($menu['blank'] == 1 ? 'checked' : '') . '/><span title="Open in New Window">Open in New Window</span></label>
|
||||
@ -134,4 +134,4 @@ if (isset($_REQUEST['template'])) {
|
||||
$twig->display('admin.menus.form.html.twig', array(
|
||||
'templates' => $templates
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ if($action == 'edit' || $action == 'new') {
|
||||
'news_link_form' => '?p=news&action=' . ($action == 'edit' ? 'edit' : 'add'),
|
||||
'news_id' => isset($id) ? $id : null,
|
||||
'title' => isset($p_title) ? $p_title : '',
|
||||
'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
|
||||
'body' => isset($body) ? escapeHtml($body) : '',
|
||||
'type' => isset($type) ? $type : null,
|
||||
'player' => isset($player) && $player->isLoaded() ? $player : null,
|
||||
'player_id' => isset($player_id) ? $player_id : null,
|
||||
|
@ -105,7 +105,7 @@ $twig->display('admin.pages.form.html.twig', array(
|
||||
'title' => $p_title,
|
||||
'php' => $php,
|
||||
'enable_tinymce' => $enable_tinymce,
|
||||
'body' => isset($body) ? htmlentities($body, ENT_COMPAT, 'UTF-8') : '',
|
||||
'body' => isset($body) ? escapeHtml($body) : '',
|
||||
'groups' => $groups->getGroups(),
|
||||
'access' => $access
|
||||
));
|
||||
|
@ -1244,6 +1244,10 @@ function getCustomPage($page, &$success)
|
||||
return $content;
|
||||
}
|
||||
|
||||
function escapeHtml($html) {
|
||||
return htmlentities($html, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
|
||||
}
|
||||
|
||||
// validator functions
|
||||
require_once LIBS . 'validator.php';
|
||||
require_once SYSTEM . 'compat/base.php';
|
||||
|
Loading…
x
Reference in New Issue
Block a user