fix: [layout:title] Make sure page title are correctly formatted

pull/9140/head
Sami Mokaddem 2023-06-06 15:52:16 -04:00
parent f7232ed842
commit 286c84fab0
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
6 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@
'data_path' => 'Correlation.count' 'data_path' => 'Correlation.count'
] ]
], ],
'title' => empty($ajax) ? $title_for_layout : false, 'title' => empty($ajax) ? h($title_for_layout) : false,
'description' => empty($ajax) ? __('The values with the most correlation entries.') : false, 'description' => empty($ajax) ? __('The values with the most correlation entries.') : false,
'pull' => 'right', 'pull' => 'right',
'actions' => [ 'actions' => [

View File

@ -63,7 +63,7 @@ echo $this->element('genericElements/IndexTable/index_table', [
'element' => 'boolean' 'element' => 'boolean'
] ]
], ],
'title' => empty($ajax) ? $title_for_layout : false, 'title' => empty($ajax) ? h($title_for_layout) : false,
'description' => empty($ajax) ? __('The values with the most correlation entries.') : false, 'description' => empty($ajax) ? __('The values with the most correlation entries.') : false,
'pull' => 'right', 'pull' => 'right',
'actions' => [ 'actions' => [

View File

@ -43,7 +43,7 @@
'class' => 'shortish' 'class' => 'shortish'
] ]
], ],
'title' => empty($ajax) ? $title_for_layout : false, 'title' => empty($ajax) ? h($title_for_layout) : false,
'description' => empty($ajax) ? __('The values with the most correlation entries.') : false, 'description' => empty($ajax) ? __('The values with the most correlation entries.') : false,
'pull' => 'right', 'pull' => 'right',
'actions' => [ 'actions' => [

View File

@ -19,7 +19,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html> <html>
<head> <head>
<title><?php echo $title_for_layout;?></title> <title><?php echo h($title_for_layout);?></title>
</head> </head>
<body> <body>
<?php echo $this->fetch('content');?> <?php echo $this->fetch('content');?>

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="<?= $baseurl ?>/img/favicon.png"> <link rel="shortcut icon" href="<?= $baseurl ?>/img/favicon.png">
<title><?= $title_for_layout, ' - ', h(Configure::read('MISP.title_text') ?: 'MISP') ?></title> <title><?= h($title_for_layout), ' - ', h(Configure::read('MISP.title_text') ?: 'MISP') ?></title>
<?php <?php
$css = [ $css = [
['bootstrap', ['preload' => true]], ['bootstrap', ['preload' => true]],

View File

@ -24,7 +24,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
<?php echo $this->Html->charset(); ?> <?php echo $this->Html->charset(); ?>
<title> <title>
<?php echo $cakeDescription ?>: <?php echo $cakeDescription ?>:
<?php echo $title_for_layout; ?> <?php echo h($title_for_layout); ?>
</title> </title>
<?php <?php
echo $this->Html->meta('icon'); echo $this->Html->meta('icon');