WordPress.org

Make WordPress Core

Opened 7 years ago

Last modified 19 months ago

#14584 reopened defect (bug)

HTML entities in category and tag elements

Reported by: lavamind Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.1
Component: Export Keywords: has-patch needs-testing
Focuses: Cc:

Description

The script wp-admin/includes/export.php creates CDATA blocks for category and tag data which contain HTML entities. Normally, these characters should appear un-encoded in the CDATA blocks, see #4321.

I suspect this problem may have been considered at some point, but currently the line in question is commented out : http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/export.php?rev=9148#L102

The solution, I think, would be to replace that comment with html_entity_decode($str)

Attachments (5)

14584.diff (2.2 KB) - added by lavamind 7 years ago.
14584v2.diff (467 bytes) - added by c3mdigital 4 years ago.
Patch refresh
14584v3.diff (479 bytes) - added by ianmjones 3 years ago.
Patch refreshed to apply cleanly on current repository layout.
14584.4.patch (479 bytes) - added by ianmjones 3 years ago.
Patch refreshed for 4.2
14584.patch (536 bytes) - added by ianmjones 19 months ago.
Refreshed for 4.6, replaced commented out red-herring code with explanation of why encoded html entities are in CDATA.

Download all attachments as: .zip

Change History (11)

@lavamind
7 years ago

@c3mdigital
4 years ago

Patch refresh

#1 @c3mdigital
4 years ago

  • Keywords has-patch added
  • Version changed from 3.0.1 to 2.1

Refreshing patch.

@ianmjones
3 years ago

Patch refreshed to apply cleanly on current repository layout.

#2 @ianmjones
3 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Confirmed and tested refreshed patch (14584v3.diff) on 4.1-alpha-30000.
Tested import unaffected by change to more compliant CDATA format.

#3 @ianmjones
3 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

#4 @ianmjones
3 years ago

  • Keywords needs-testing added

@ianmjones
3 years ago

Patch refreshed for 4.2

#5 @chriscct7
2 years ago

  • Keywords needs-refresh added

@ianmjones
19 months ago

Refreshed for 4.6, replaced commented out red-herring code with explanation of why encoded html entities are in CDATA.

#6 @ianmjones
19 months ago

  • Keywords needs-refresh removed

The importer requires that the CDATA contain data in the same format that will be inserted into the database, which means html entity encoded characters are required.

Note: See TracTickets for help on using tickets.