Opened 9 years ago
Closed 9 years ago
#36037 closed defect (bug) (duplicate)
Invalid XHTML at lines 4561-4564 and 4583-4586 of wp-includes/formatting.php
Reported by: |
|
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.
Related: #36036