Check "Files" of type 'application/xhtml+xml' for oEmbed in addition to just text/html

This commit is contained in:
Craig Andrews 2009-09-01 23:02:03 -04:00
parent f86fed357c
commit efcfd209ef

View File

@ -78,7 +78,7 @@ class File extends Memcached_DataObject
$file_id = $x->insert();
if (isset($redir_data['type'])
&& ('text/html' === substr($redir_data['type'], 0, 9))
&& (('text/html' === substr($redir_data['type'], 0, 9) || 'application/xhtml+xml' === substr($redir_data['type'], 0, 21)))
&& ($oembed_data = File_oembed::_getOembed($given_url))) {
File_oembed::saveNew($oembed_data, $file_id);
}