diff --git a/src/Bridges/Framework/TracyBridge.php b/src/Bridges/Framework/TracyBridge.php index c9feae9..32fb21b 100644 --- a/src/Bridges/Framework/TracyBridge.php +++ b/src/Bridges/Framework/TracyBridge.php @@ -35,9 +35,13 @@ public static function initialize() if ($e instanceof Latte\CompileException) { return array( 'tab' => 'Template', - 'panel' => (@is_file($e->sourceName) // @ - may trigger error - ? '

File: ' . Helpers::editorLink($e->sourceName, $e->sourceLine) . '

' - : '') + 'panel' => (preg_match('#\n|\?#', $e->sourceName) + ? '' + : '

' + . (@is_file($e->sourceName) // @ - may trigger error + ? 'File: ' . Helpers::editorLink($e->sourceName, $e->sourceLine) + : '' . htmlspecialchars($e->sourceName . ($e->sourceLine ? ':' . $e->sourceLine : '')) . '') + . '

') . '
'
 						. BlueScreen::highlightLine(htmlspecialchars($e->sourceCode, ENT_IGNORE, 'UTF-8'), $e->sourceLine)
 						. '
',