Opened 6 years ago
Closed 6 years ago
#3496 closed defect (bug) (fixed)
Two CDATA sections needed to work with 'application/xhtml+xml' mime-type
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | low | Milestone: | 2.1 |
| Component: | Administration | Version: | 2.1 |
| Severity: | blocker | Keywords: | has-patch commit |
| 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.

Adds CDATA wrappers around the problematic JavaScript.