Skip to content

Commit 8246439

Browse files
committed
Remove JSON +json subtype handling
1 parent 2b3d0d0 commit 8246439

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wp-includes/html-api/class-wp-html-tag-processor.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4091,14 +4091,16 @@ public function is_json_script_tag(): bool {
40914091
* > A JSON MIME type is any MIME type whose subtype ends in "+json" or whose essence
40924092
* > is "application/json" or "text/json".
40934093
*
4094+
* The JSON subtype ending in "+json" is not currently handled due to lack
4095+
* of a MIME type parser.
4096+
*
40944097
* @see https://mimesniff.spec.whatwg.org/#json-mime-type
40954098
*/
40964099
if (
40974100
'application/json' === $type_string
40984101
|| 'importmap' === $type_string
40994102
|| 'speculationrules' === $type_string
41004103
|| 'text/json' === $type_string
4101-
|| str_ends_with( $type_string, '+json' )
41024104
) {
41034105
return true;
41044106
}

0 commit comments

Comments
 (0)