Ticket #33591: 33591.diff
File 33591.diff, 1.1 KB (added by , 9 years ago) |
---|
-
feed.php
502 502 if ($key == 'enclosure') { 503 503 foreach ( (array) $val as $enc ) { 504 504 $enclosure = explode("\n", $enc); 505 $new_enclosure = array( 'href' => trim( htmlspecialchars( $enclosure[0] ) ), 'length' => trim( $enclosure[1] ), 'type' => trim( htmlspecialchars( $enclosure[2] ) ) ); 506 $new_enclosure = array_merge($new_enclosure, array_slice($enclosure, 3)); 505 507 /** 506 508 * Filter the atom enclosure HTML link tag for the current post. 507 509 * … … 509 511 * 510 512 * @param string $html_link_tag The HTML link tag with a URI and other attributes. 511 513 */ 512 echo apply_filters( 'atom_enclosure', '<link href="' . trim( htmlspecialchars( $enclosure[0] ) ) . '" rel="enclosure" length="' . trim( $enclosure[1] ) . '" type="' . trim( $enclosure[2] ). '" />' . "\n" );514 echo apply_filters( 'atom_enclosure', '<link href="' . $new_enclosure['href'] . '" rel="enclosure" length="' . $new_enclosure['length'] . '" type="' . $new_enclosure['type'] . '" />' . "\n" ); 513 515 } 514 516 } 515 517 }