Skip to content

Commit b5e8ea9

Browse files
committed
Fix regex in function rss_enclosure(), fixes WordPress#9192
git-svn-id: https://develop.svn.wordpress.org/trunk@10615 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c4e96cc commit b5e8ea9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wp-includes/feed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@ function rss_enclosure() {
403403
foreach ( (array) get_post_custom() as $key => $val) {
404404
if ($key == 'enclosure') {
405405
foreach ( (array) $val as $enc ) {
406-
$enclosure = split("\n", $enc);
406+
$enclosure = explode("\n", $enc);
407407

408408
//only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3'
409-
$t = split('[ \t]', trim($enclosure[2]) );
409+
$t = preg_split('/[ \t]/', trim($enclosure[2]) );
410410
$type = $t[0];
411411

412412
echo apply_filters('rss_enclosure', '<enclosure url="' . trim(htmlspecialchars($enclosure[0])) . '" length="' . trim($enclosure[1]) . '" type="' . $type . '" />' . "\n");

0 commit comments

Comments
 (0)