Nested CDATA breaks XML validity

Created on 22 December 2023, about 1 year ago
Updated 25 June 2024, 7 months ago

Problem/Motivation

When a field renders CDATA, the closing CDATA effectively closes the root CDATA.

Steps to reproduce

Use encoded content with a field that contains its own CDATA content. Check the validity of the output XML (e.g., https://rssatom.com/). Note the inner ]]> closes the outer CDATA.

Proposed resolution

Encode any closing ]]> within the field with ]]]]><![CDATA[> (see https://en.wikipedia.org/wiki/CDATA#Nesting).

Remaining tasks

Determine if this is necessary pending πŸ“Œ Work out how to render element HTML without needing |raw twig filter Active .

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States greenskin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024