Skip to content

Commit 45c4c45

Browse files
committed
REST API: Escape a hyphen in wp_is_json_media_type().
Props batmoo, xknown, jonsurrell. git-svn-id: https://develop.svn.wordpress.org/trunk@65569 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a891337 commit 45c4c45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/wp-includes/load.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,7 @@ function wp_is_json_media_type( $media_type ) {
20072007
static $cache = array();
20082008

20092009
if ( ! isset( $cache[ $media_type ] ) ) {
2010-
$cache[ $media_type ] = (bool) preg_match( '/(^|\s|,)application\/([\w!#\$&-\^\.\+]+\+)?json(\+oembed)?($|\s|;|,)/i', $media_type );
2010+
$cache[ $media_type ] = (bool) preg_match( '/(^|\s|,)application\/([\w!#\$&\-\^\.\+]+\+)?json(\+oembed)?($|\s|;|,)/i', $media_type );
20112011
}
20122012

20132013
return $cache[ $media_type ];

0 commit comments

Comments
 (0)