Skip to content

Commit

Permalink
Filter selected text to prevent invalid XML (#4234)
Browse files Browse the repository at this point in the history
  • Loading branch information
aheart authored and muglug committed Oct 7, 2020
1 parent 49b4fe0 commit 484c34a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Report/JunitReport.php
Expand Up @@ -168,7 +168,7 @@ private function dataToOutput(IssueData $data): string
$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";
Expand Down

0 comments on commit 484c34a

Please sign in to comment.