1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Filter selected text to prevent invalid XML (#4234)

This commit is contained in:
aheart 2020-09-22 20:44:14 +03:00 committed by Daniil Gentili
parent e3e5a55907
commit 19a25777af
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -168,7 +168,7 @@ class JunitReport extends Report
$ret = 'message: ' . htmlspecialchars(trim($data->message), ENT_XML1 | ENT_QUOTES) . "\n";
$ret .= 'type: ' . trim($data->type) . "\n";
$ret .= 'snippet: ' . htmlspecialchars(trim($data->snippet), ENT_XML1 | ENT_QUOTES) . "\n";
$ret .= 'selected_text: ' . trim($data->selected_text) . "\n";
$ret .= 'selected_text: ' . htmlspecialchars(trim($data->selected_text)) . "\n";
$ret .= 'line: ' . $data->line_from . "\n";
$ret .= 'column_from: ' . $data->column_from . "\n";
$ret .= 'column_to: ' . $data->column_to . "\n";