WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#36037 closed defect (bug) (duplicate)

Invalid XHTML at lines 4561-4564 and 4583-4586 of wp-includes/formatting.php

Reported by: sephr Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.2
Component: Formatting Keywords:
Focuses: Cc:

Description

There is invalid XHTML at lines 4561-4564 and 4583-4586 of wp-includes/formatting.php (see https://github.com/WordPress/WordPress/blob/d11514485719f41469daff6cde3f3006bd35b58a/wp-includes/formatting.php#L4561-L4564 and https://github.com/WordPress/WordPress/blob/d11514485719f41469daff6cde3f3006bd35b58a/wp-includes/formatting.php#L4583-L4586 )

These script blocks need to be escaped with /*<![CDATA[*/ ..script content.. /*]]>*/
Otherwise it will cause rendering errors for people serving XHTML as application/xhtml+xml

WordPress was not always like this, as 5 years ago when I made my strict XHTMl theme there were no errors. For a few years I had XHTML disabled for DISQUS compatibility. I recently re-enabled serving as application/xhtml+xml and to my surprise find this regression in the WP codebase.

Attachments (1)

36037.patch (725 bytes) - added by subharanjan 5 years ago.
Added CDATA

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
5 years ago

  • Keywords needs-patch good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

Related: #36036

@subharanjan
5 years ago

Added CDATA

#2 @SergeyBiryukov
5 years ago

  • Milestone changed from Future Release to 4.5

#4 @SergeyBiryukov
5 years ago

  • Keywords needs-patch good-first-bug removed
  • Milestone 4.5 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #36036.

Cool, let's merge them then :)

Note: See TracTickets for help on using tickets.