From ee173d496e38d4d2f158ee372d49fb110332d8ea Mon Sep 17 00:00:00 2001 From: RojerUA Date: Wed, 17 Dec 2014 16:46:08 +0100 Subject: [PATCH] Fix handling of '&' sympols in JUnit XML --- src/ParaTest/Logging/JUnit/Writer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ParaTest/Logging/JUnit/Writer.php b/src/ParaTest/Logging/JUnit/Writer.php index 02ac7f85..fa9c759e 100644 --- a/src/ParaTest/Logging/JUnit/Writer.php +++ b/src/ParaTest/Logging/JUnit/Writer.php @@ -147,7 +147,7 @@ protected function appendCase($suiteNode, TestCase $case) protected function appendDefects($caseNode, $defects, $type) { foreach($defects as $defect) { - $defectNode = $this->document->createElement($type, $defect['text'] . "\n"); + $defectNode = $this->document->createElement($type, htmlentities($defect['text']) . "\n"); $defectNode->setAttribute('type', $defect['type']); $caseNode->appendChild($defectNode); }