That's problem in XML document:
<![CDATA[<b>Title</b>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
]]>
I need to insert thу CDATA expression in this text. How to do it ? (I see the error while evaluationg document if I do like this)
<![CDATA[]]]]>Expression<![CDATA[>]]>
@Oded posted a reference real answer above in a comment... I want to add it as an answer so people can find it.
If he/she adds it we can delete this one.
Yes, it is important to be really sure you need to do this; "CDATA" is often misused in the first place, let alone nested. But in some funky occasions we do.
The basic plan is to bury the end of the nested CDATA in another CDATA. It will be stripped with interpretation of the outer CDATA to leave the inner.
This is in the wikipedia article from @Oded above
en.wikipedia.org/wiki/CDATA#Nesting
The action is to replace any inner, nested
]]>
with
]]]]><![CDATA[>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With