@@ -6,6 +6,7 @@ namespace Nette\Bridges\ApplicationTracy;
66use Nette \Application \UI \Presenter ;
77use Tracy ;
88use Tracy \Dumper ;
9+ use Tracy \Helpers ;
910
1011?>
1112<style class="tracy-debug">
@@ -36,7 +37,7 @@ use Tracy\Dumper;
3637<?php if ($ matched === null ): ?>
3738 no route
3839<?php elseif (isset ($ matched [Presenter::PRESENTER_KEY ])): ?>
39- <?= htmlspecialchars ($ matched [Presenter::PRESENTER_KEY ] . ': ' . (isset ($ matched [Presenter::ACTION_KEY ]) ? $ matched [Presenter::ACTION_KEY ] : Presenter::DEFAULT_ACTION ) . (isset ($ matched [Presenter::SIGNAL_KEY ]) ? " {$ matched [Presenter::SIGNAL_KEY ]}! " : '' ), ENT_NOQUOTES , ' UTF-8 ' ) ?>
40+ <?= Helpers:: escapeHtml ($ matched [Presenter::PRESENTER_KEY ] . ': ' . (isset ($ matched [Presenter::ACTION_KEY ]) ? $ matched [Presenter::ACTION_KEY ] : Presenter::DEFAULT_ACTION ) . (isset ($ matched [Presenter::SIGNAL_KEY ]) ? " {$ matched [Presenter::SIGNAL_KEY ]}! " : '' )) ?>
4041<?php endif ?>
4142</h1>
4243
@@ -62,37 +63,37 @@ use Tracy\Dumper;
6263 <tr class="<?= $ router ['matched ' ] ?> ">
6364 <td><?= $ router ['matched ' ] === 'yes ' ? '✓ ' : ($ router ['matched ' ] === 'may ' ? '≈ ' : '' ) ?> </td>
6465
65- <td><code title="<?= htmlspecialchars ($ router ['class ' ], ENT_QUOTES , ' UTF-8 ' ) ?> "><?= htmlspecialchars ($ router ['mask ' ] ?? $ router ['class ' ], ENT_NOQUOTES , ' UTF-8 ' ) ?> </code></td>
66+ <td><code title="<?= Helpers:: escapeHtml ($ router ['class ' ]) ?> "><?= Helpers:: escapeHtml ($ router ['mask ' ] ?? $ router ['class ' ]) ?> </code></td>
6667
6768 <td><code>
6869 <?php foreach ($ router ['defaults ' ] as $ key => $ value ): ?>
69- <?= htmlspecialchars (( string ) $ key, ENT_IGNORE , ' UTF-8 ' ), ' = ' , is_string ($ value ) ? htmlspecialchars ($ value, ENT_IGNORE , ' UTF-8 ' ) . '<br /> ' : Dumper::toHtml ($ value , [Dumper::COLLAPSE => true , Dumper::LIVE => true ]) ?>
70+ <?= Helpers:: escapeHtml ( $ key ), ' = ' , is_string ($ value ) ? Helpers:: escapeHtml ($ value ) . '<br /> ' : Dumper::toHtml ($ value , [Dumper::COLLAPSE => true , Dumper::LIVE => true ]) ?>
7071 <?php endforeach ?>
7172 </code></td>
7273
73- <?php if ($ hasModule ): ?> <td><code><?= htmlspecialchars ($ router ['module ' ], ENT_NOQUOTES , ' UTF-8 ' ) ?> </code></td><?php endif ?>
74+ <?php if ($ hasModule ): ?> <td><code><?= Helpers:: escapeHtml ($ router ['module ' ]) ?> </code></td><?php endif ?>
7475
7576 <td><?php if ($ router ['params ' ]): ?> <code>
7677 <?php $ params = $ router ['params ' ]; ?>
7778 <?php if (isset ($ params [Presenter::PRESENTER_KEY ])): ?>
78- <strong><?= htmlspecialchars ($ params ['presenter ' ] . ': ' . (isset ($ params [Presenter::ACTION_KEY ]) ? $ params [Presenter::ACTION_KEY ] : Presenter::DEFAULT_ACTION ), ENT_NOQUOTES , ' UTF-8 ' ) ?> </strong><br />
79+ <strong><?= Helpers:: escapeHtml ($ params ['presenter ' ] . ': ' . (isset ($ params [Presenter::ACTION_KEY ]) ? $ params [Presenter::ACTION_KEY ] : Presenter::DEFAULT_ACTION )) ?> </strong><br />
7980 <?php unset($ params [Presenter::PRESENTER_KEY ], $ params [Presenter::ACTION_KEY ]) ?>
8081 <?php endif ?>
8182 <?php foreach ($ params as $ key => $ value ): ?>
82- <?= htmlspecialchars (( string ) $ key, ENT_IGNORE , ' UTF-8 ' ), ' = ' , is_string ($ value ) ? htmlspecialchars ($ value, ENT_IGNORE , ' UTF-8 ' ) . '<br /> ' : Dumper::toHtml ($ value , [Dumper::COLLAPSE => true , Dumper::LIVE => true ]) ?>
83+ <?= Helpers:: escapeHtml ( $ key ), ' = ' , is_string ($ value ) ? Helpers:: escapeHtml ($ value ) . '<br /> ' : Dumper::toHtml ($ value , [Dumper::COLLAPSE => true , Dumper::LIVE => true ]) ?>
8384 <?php endforeach ?>
84- </code><?php elseif ($ router ['error ' ]): ?> <strong><?= htmlspecialchars ($ router ['error ' ]->getMessage (), ENT_IGNORE , ' UTF-8 ' ) ?> </strong><?php endif ?> </td>
85+ </code><?php elseif ($ router ['error ' ]): ?> <strong><?= Helpers:: escapeHtml ($ router ['error ' ]->getMessage ()) ?> </strong><?php endif ?> </td>
8586 </tr>
8687 <?php endforeach ?>
8788 </tbody>
8889 </table>
8990<?php endif ?>
9091
91- <p><code><?= htmlspecialchars ($ method, ENT_IGNORE , ' UTF-8 ' ) ?> </code>
92- <code><?= htmlspecialchars ($ url ->getBaseUrl (), ENT_IGNORE , ' UTF-8 ' ) ?> <span class="nette-RoutingPanel-rel"><?= htmlspecialchars ($ url ->getRelativeUrl (), ENT_IGNORE , ' UTF-8 ' ) ?> </span></code></p>
92+ <p><code><?= Helpers:: escapeHtml ($ method ) ?> </code>
93+ <code><?= Helpers:: escapeHtml ($ url ->getBaseUrl ()) ?> <span class="nette-RoutingPanel-rel"><?= Helpers:: escapeHtml ($ url ->getRelativeUrl ()) ?> </span></code></p>
9394
9495 <?php if ($ source ): ?>
95- <p><a href="<?= htmlspecialchars (Tracy \Helpers::editorUri ($ source ->getFileName (), $ source ->getStartLine ()), ENT_QUOTES , ' UTF-8 ' ) ?> "><?= $ source instanceof \ReflectionClass ? $ source ->getName () : $ source ->getDeclaringClass ()->getName () . ':: ' . $ source ->getName () . '() ' ?> </a></p>
96+ <p><a href="<?= Helpers:: escapeHtml (Tracy \Helpers::editorUri ($ source ->getFileName (), $ source ->getStartLine ())) ?> "><?= $ source instanceof \ReflectionClass ? $ source ->getName () : $ source ->getDeclaringClass ()->getName () . ':: ' . $ source ->getName () . '() ' ?> </a></p>
9697 <?php endif ?>
9798</div>
9899</div>
0 commit comments