mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 07:07:38 +02:00
Fix regex in function rss_enclosure(), fixes #9192 for 2.7
git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91b2a262ba
commit
1c38c52b64
@ -403,10 +403,10 @@ function rss_enclosure() {
|
||||
foreach ( (array) get_post_custom() as $key => $val) {
|
||||
if ($key == 'enclosure') {
|
||||
foreach ( (array) $val as $enc ) {
|
||||
$enclosure = split("\n", $enc);
|
||||
$enclosure = explode("\n", $enc);
|
||||
|
||||
//only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3'
|
||||
$t = split('[ \t]', trim($enclosure[2]) );
|
||||
$t = preg_split('/[ \t]/', trim($enclosure[2]) );
|
||||
$type = $t[0];
|
||||
|
||||
echo apply_filters('rss_enclosure', '<enclosure url="' . trim(htmlspecialchars($enclosure[0])) . '" length="' . trim($enclosure[1]) . '" type="' . $type . '" />' . "\n");
|
||||
|
Loading…
Reference in New Issue
Block a user