xmlify enclosure items

This commit is contained in:
Friendika 2011-04-06 20:36:24 -07:00
parent 109c25a1bd
commit c8d827a671

View file

@ -1591,11 +1591,11 @@ function item_getfeedattach($item) {
$matches = false; $matches = false;
$cnt = preg_match('|\<a href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" >(.+?)</a>|',$r,$matches); $cnt = preg_match('|\<a href=\"(.+?)\" size=\"(.+?)\" type=\"(.+?)\" >(.+?)</a>|',$r,$matches);
if($cnt) { if($cnt) {
$ret .= '<link rel="enclosure" href="' . $matches[1] . '" type="' . $matches[3] . '" '; $ret .= '<link rel="enclosure" href="' . xmlify($matches[1]) . '" type="' . xmlify($matches[3]) . '" ';
if(intval($matches[2])) if(intval($matches[2]))
$ret .= 'size="' . intval($matches[2]) . '" '; $ret .= 'size="' . intval($matches[2]) . '" ';
if($matches[4] !== ' ') if($matches[4] !== ' ')
$ret .= 'title="' . $matches[4] . '" '; $ret .= 'title="' . xmlify($matches[4]) . '" ';
$ret .= ' />' . "\r\n"; $ret .= ' />' . "\r\n";
} }
} }