Skip to content

Commit 74c74a2

Browse files
authored
Fix CData recognition (#11443)
1 parent 163416b commit 74c74a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Build/Utilities/Utilities.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ internal static string GetXmlNodeInnerContents(XmlElementWithLocation node)
223223
}
224224

225225
// ...or it looks like the whole thing is a big CDATA tag ...
226-
bool startsWithCData = (innerXml.IndexOf("<![CDATA[", StringComparison.Ordinal) == 0);
226+
bool startsWithCData = innerXml.AsSpan().TrimStart().StartsWith("<![CDATA[".AsSpan(), StringComparison.Ordinal);
227227

228228
if (startsWithCData)
229229
{

0 commit comments

Comments
 (0)