Skip to content

Commit 38d04ef

Browse files
committed
Ensure system-err and system-out contents are properly escaped.
1 parent 3fcef17 commit 38d04ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

commands/core/test.drush.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,13 @@ function drush_test_xml_results($test_id, $dir, $info) {
315315
$test_case_element->appendChild($error_element);
316316
}
317317
if (!empty($test_case->system_out)) {
318-
$system_out_element = $xml->createElement('system-out', $test_case->system_out);
318+
$system_out_element = $xml->createElement('system-out');
319+
$system_out_element->appendChild($xml->createTextNode($test_case->system_out));
319320
$test_case_element->appendChild($system_out_element);
320321
}
321322
if (!empty($test_case->system_err)) {
322-
$system_err_element = $xml->createElement('system-err', $test_case->system_err);
323+
$system_err_element = $xml->createElement('system-err');
324+
$system_err_element->appendChild($xml->createTextNode($test_case->system_err));
323325
$test_case_element->appendChild($system_err_element);
324326
}
325327
$test_suite_element->appendChild($test_case_element);

0 commit comments

Comments
 (0)