Ticket #4242 (closed defect: fixed)

Opened 2 years ago

Last modified 8 months ago

Export function does not define comments as CDATA

Reported by: ionfish Assigned to: westi
Priority: normal Milestone: 2.5
Component: Administration Version: 2.3
Severity: normal Keywords: has-patch needs-testing
Cc:

Description

Because comments aren't defined as CDATA, if they contain invalid characters (which is likely, given the public nature of comments) then data can be lost when the XML file WordPress generates is imported into a new database.

Attachments

export-cdata.diff (1.6 kB) - added by nbachiyski on 07/10/07 22:25:27.
wxr-cdata.patch (1.8 kB) - added by westi on 03/14/08 19:32:48.
Updated patch to apply to trunk

Change History

07/10/07 22:25:27 changed by nbachiyski

  • attachment export-cdata.diff added.

07/10/07 22:26:41 changed by nbachiyski

  • keywords changed from export comments CDATA to export comments CDATA has-patch.

Here is a patch, witch adds the post content, the comment content and the dc:creator fields as CDATA sections. Are there any other that should be treated this way?

07/11/07 00:45:32 changed by foolswisdom

  • milestone changed from 2.4 (future) to 2.3 (trunk).

03/14/08 19:32:01 changed by westi

  • keywords changed from export comments CDATA has-patch to has-patch needs-testing.
  • owner changed from anonymous to westi.
  • status changed from new to assigned.

Current patch doesn't apply

Uploading updated patch.

However a quick test of export from trunk with this change and import into branches/2.3 failed so this may need more work on the import side?

03/14/08 19:32:48 changed by westi

  • attachment wxr-cdata.patch added.

Updated patch to apply to trunk

03/14/08 19:34:13 changed by westi

meh. it looks like I missed an echo in my updated patch and no comments are being exported :-(

03/14/08 19:37:19 changed by westi

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [7299]) Enclose more things as CDATA when exporting. Fixes #4242 props nbachiyski.