Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#19545 closed defect (bug) (duplicate)

WXR Export File does not properly escape content in CDATA tags

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


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)

#1 @duck_
6 years 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.