From 375cdeb63620420bcf7bb4a4727be24dde43cb79 Mon Sep 17 00:00:00 2001 From: Jack Worman Date: Wed, 25 Jan 2023 10:57:28 -0500 Subject: [PATCH] cdata in baseline --- src/Psalm/ErrorBaseline.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Psalm/ErrorBaseline.php b/src/Psalm/ErrorBaseline.php index 135a2a984..227132769 100644 --- a/src/Psalm/ErrorBaseline.php +++ b/src/Psalm/ErrorBaseline.php @@ -16,6 +16,7 @@ use function array_merge; use function array_reduce; use function array_values; use function get_loaded_extensions; +use function htmlspecialchars; use function implode; use function ksort; use function min; @@ -267,7 +268,7 @@ final class ErrorBaseline foreach ($existingIssueType['s'] as $selection) { $codeNode = $baselineDoc->createElement('code'); $textContent = trim($selection); - if ($textContent !== \htmlspecialchars($textContent)) { + if ($textContent !== htmlspecialchars($textContent)) { $codeNode->append($baselineDoc->createCDATASection($textContent)); } else { $codeNode->textContent = trim($textContent);