WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#3496 closed defect (bug) (fixed)

Two CDATA sections needed to work with 'application/xhtml+xml' mime-type

Reported by: JeremyVisser Owned by:
Milestone: 2.1 Priority: low
Severity: blocker Version: 2.1
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

In wp-includes/general-template.php, there are two JavaScript sections related to the TinyMCE editor, where if Content-type: application/xhtml+xml is specified in the HTML headers, the Write Post page will fail to load.

This is because Firefox will parse a page served with application/xhtml+xml with an XML parser, as opposed to an SGML parser.

The XML parser apparently doesn't like the two ampersands (&&) in the JavaScript code, and bombs out. Adding CDATA tags around the code fixes the problem.

Attached is a ready-made patch.

Ticket priority is 'low', because not many people use the application/xhtml+xml for WordPress, but severity is 'blocker', because the Write Post page breaks.

Attachments (1)

general-template.php.diff (961 bytes) - added by JeremyVisser 9 years ago.
Adds CDATA wrappers around the problematic JavaScript.

Download all attachments as: .zip

Change History (3)

@JeremyVisser9 years ago

Adds CDATA wrappers around the problematic JavaScript.

comment:1 @Viper007Bond9 years ago

  • Keywords has-patch commit added

Looks good to me.

comment:2 @matt9 years ago

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

(In [4691]) Use CDATA to avoid validation errors, fixes #3496. Hat tip: JeremyVisser

Note: See TracTickets for help on using tickets.