Skip to content

Commit 1963403

Browse files
committed
Use Debugger::esc function
1 parent 6dc1cbb commit 1963403

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/Debug/LogCollector.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Framework\Log\Debug;
1111

1212
use Framework\Debug\Collector;
13-
use Framework\Debug\Debugger;
13+
use Framework\Debug\Debugger as D;
1414
use Framework\Log\Logger;
1515
use Framework\Log\LogLevel;
1616

@@ -55,11 +55,11 @@ public function getContents() : string
5555
$destination = $this->logger->getDestination();
5656
if ($destination):
5757
?>
58-
<p><strong>Destination:</strong> <?= \htmlentities($destination) ?></p>
58+
<p><strong>Destination:</strong> <?= D::esc($destination) ?></p>
5959
<?php
6060
endif;
6161
$level = $this->logger->getLevel(); ?>
62-
<p><strong>Log Level:</strong> <?= \htmlentities(
62+
<p><strong>Log Level:</strong> <?= D::esc(
6363
$level->value . ' ' . $level->name
6464
) ?>
6565
</p>
@@ -79,7 +79,7 @@ public function getContents() : string
7979
? ' class="active" title="Current level"'
8080
: '' ?>>
8181
<td><?= $case->value ?></td>
82-
<td><?= \htmlentities($case->name) ?></td>
82+
<td><?= D::esc($case->name) ?></td>
8383
</tr>
8484
<?php endforeach ?>
8585
</tbody>
@@ -113,16 +113,16 @@ protected function renderLogs() : string
113113
<?php foreach ($this->getData() as $index => $data): ?>
114114
<tr>
115115
<td><?= $index + 1 ?></td>
116-
<td><?= \htmlentities($data['date']) ?></td>
117-
<td><?= \htmlentities($data['time']) ?></td>
118-
<td><?= \htmlentities($data['id']) ?></td>
119-
<td><?= \htmlentities((string) $data['level']) ?></td>
120-
<td><?= \htmlentities($data['levelName']) ?></td>
116+
<td><?= D::esc($data['date']) ?></td>
117+
<td><?= D::esc($data['time']) ?></td>
118+
<td><?= D::esc($data['id']) ?></td>
119+
<td><?= D::esc($data['level']) ?></td>
120+
<td><?= D::esc($data['levelName']) ?></td>
121121
<td>
122-
<pre><code class="language-log"><?= \htmlentities($data['message']) ?></code></pre>
122+
<pre><code class="language-log"><?= D::esc($data['message']) ?></code></pre>
123123
</td>
124124
<td><?= $data['written'] ? 'Yes' : 'No' ?></td>
125-
<td><?= Debugger::roundSecondsToMilliseconds($data['end'] - $data['start']) ?></td>
125+
<td><?= D::roundSecondsToMilliseconds($data['end'] - $data['start']) ?></td>
126126
</tr>
127127
<?php endforeach ?>
128128
</tbody>

0 commit comments

Comments
 (0)