1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
DanielnetoDotCom 2021-01-15 17:30:03 -03:00
parent 5876a5261a
commit 9aef19e42f
3 changed files with 15 additions and 10 deletions

View file

@ -43,4 +43,9 @@ if(!empty($_REQUEST['roku'])){
header('Content-Type: text/xml; charset=UTF8');
include $global['systemRootPath'] . 'feed/mrss.php';
}
function feedText($text){
return str_replace(array(' '), array(''), htmlentities(strip_tags(br2nl($text))));
}
?>

View file

@ -5,11 +5,11 @@ echo'<?xml version="1.0" encoding="UTF-8"?>';
xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml">
<channel>
<title><?php echo htmlentities($title); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($description))); ?></description>
<title><?php echo feedText($title); ?></title>
<description><?php echo feedText($description); ?></description>
<link><?php echo $link; ?></link>
<image>
<title><?php echo htmlentities($title); ?></title>
<title><?php echo feedText($title); ?></title>
<url><?php echo $logo; ?></url>
<link><?php echo $link; ?></link>
<width>144</width>
@ -39,8 +39,8 @@ echo'<?xml version="1.0" encoding="UTF-8"?>';
}
?>
<item>
<title><?php echo htmlentities($row['title']); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($row['description']))); ?></description>
<title><?php echo feedText($row['title']); ?></title>
<description><?php echo feedText($row['description']); ?></description>
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
<?php echo $enclosure; ?>
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate>

View file

@ -9,14 +9,14 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
<atom:link href="<?php echo $global['webSiteRootURL'].ltrim($_SERVER["REQUEST_URI"],"/"); ?>" rel="self" type="application/rss+xml" />
<title><?php echo htmlentities($title); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($description))); ?></description>
<title><?php echo feedText($title); ?></title>
<description><?php echo feedText($description); ?></description>
<link><?php echo $link; ?></link>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<image>
<title><?php echo $title; ?></title>
<title><?php echo feedText($title); ?></title>
<url><?php echo $logo; ?></url>
<link><?php echo $link; ?></link>
<width>144</width>
@ -41,8 +41,8 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
}
?>
<item>
<title><?php echo htmlentities($row['title']); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($row['description']))); ?></description>
<title><?php echo feedText($row['title']); ?></title>
<description><?php echo feedText($row['description']); ?></description>
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
<?php echo $enclosure; ?>
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate>