Skip to content

[Issue] Add support for multiple space-separated CDATA sections in Magento\Framework\Xml\Parser #29613

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #26822: Add support for multiple space-separated CDATA sections in Magento\Framework\Xml\Parser


Description (*)

Our XML files sometimes contain multiple CDATA sections per node. The XML parser class provided by Magento in /lib/internal/Magento/Framework/Xml/Parser.php already supports consecutive CDATA sections like <![CDATA[One]]><![CDATA[Two]]><![CDATA[Three]]>, which is correctly parsed as OneTwoThree. However this returns wrong results for empty text nodes in-between, like for <![CDATA[One]]> <![CDATA[Two]]> <![CDATA[Three]]>. This pull request adds the support and a related unit test.

Related Pull Requests

The switch statement has been added in #681.

Fixed Issues (if relevant)

No separate issue created.

Manual testing scenarios (*)

Unit tests added as part of this pull request.

You can use the current 2.3.4 version for testing. The file in question /lib/internal/Magento/Framework/Xml/Parser.php is unchanged since August 2017.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: XmlIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedPriority: P3May be fixed according to the position in the backlog.Progress: doneReported on 2.3.4Indicates original Magento version for the Issue report.Severity: S3Affects non-critical data or functionality and does not force users to employ a workaround.stale issue

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions