Bug #40249
Site export: nodes containing CDATA blocks make XML crash
Status: | Resolved | Start date: | 2012-08-27 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Services | |||
Target version: | Base Distribution - Sprint 10 (1.0 TP1) |
Description
nodes actually containing CDATA blocks themselves (like in <script> tags), will result into a not well-formed XML due to nested CDATA blocks.
This might be either an XMLwriter drawback, or even an XML lack?
I once already looked out how to "escape" inner-CDATA, but did not find any useful stuff.
Will look again, then :)
Associated revisions
[BUGFIX] Exporting nodes with CDATA creates broken XML
Nodes containing CDATA blocks themselves (like in <script> tags), resulted in
a not well-formed XML due to nested CDATA blocks.
This change fixes that by some CDATA magic, for import nothing changes.
Change-Id: I96aa0d83fcc543f831ae234561feac1c3653cff1
Fixes: #40249
History
#1 Updated by Karsten Dambekalns almost 3 years ago
Nesting is not possible, but can be worked around. Could you try adding something like described in http://en.wikipedia.org/wiki/CDATA#Nesting and see if that decodes as expected?
#2 Updated by Adrian Föder almost 3 years ago
I'm sure it'll work, but "TYPO3 users" shouldn't care about making CDATA nestable, IMO.
I myself can work around it, that's no problem; the reason why I opened the issue is furthermore, that having editors adding content like they're used to, will result into a not well-formed XML file when exporting.
So I think the engine should work around this, not the (HTML) developer.
#3 Updated by Karsten Dambekalns almost 3 years ago
Adrian Föder wrote:
I'm sure it'll work, but "TYPO3 users" shouldn't care about making CDATA nestable, IMO.
…
So I think the engine should work around this, not the (HTML) developer.
Of course! If it works, this should be done by the export.
#4 Updated by Karsten Dambekalns almost 3 years ago
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
- Target version set to Sprint 10 (1.0 TP1)
#5 Updated by Adrian Föder almost 3 years ago
- File cdata.png added
Ah ok, so yes, I can confirm this nicely works (see attached file).
#6 Updated by Gerrit Code Review almost 3 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/14355
#7 Updated by Karsten Dambekalns almost 3 years ago
- Status changed from Accepted to Under Review
#8 Updated by Karsten Dambekalns almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9ef8247f37fcd8d77c17acb5e2ee7245bf0b626e.