WordPress.org

Make WordPress Core

#19545 closed defect (bug) (duplicate)

WXR Export File does not properly escape content in CDATA tags

Reported by: splittingred Owned by:
Priority: normal Milestone:
Component: Export Version: 3.3
Severity: major Keywords: needs-patch
Cc:

Description

If you export a WXR file, and any content contains ]] tags, WordPress does not properly escape them and this breaks the CDATA tag recognition, terminating it early and preventing proper usage of XML parsers to read the WXR file.

For example, this following export node would break the parser:

<wp:comment_content><![CDATA[ <a href="[[~11]]" rel="nofollow">my link</a> ]]></wp:comment_content>

Change History (1)

comment:1 duck_18 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #15203.

However, you say that just "]]" breaks. Surely this isn't the case? In fact in quick testing it worked for me.

Note: See TracTickets for help on using tickets.