1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +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'); header('Content-Type: text/xml; charset=UTF8');
include $global['systemRootPath'] . 'feed/mrss.php'; 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:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml"> xmlns:gml="http://www.opengis.net/gml">
<channel> <channel>
<title><?php echo htmlentities($title); ?></title> <title><?php echo feedText($title); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($description))); ?></description> <description><?php echo feedText($description); ?></description>
<link><?php echo $link; ?></link> <link><?php echo $link; ?></link>
<image> <image>
<title><?php echo htmlentities($title); ?></title> <title><?php echo feedText($title); ?></title>
<url><?php echo $logo; ?></url> <url><?php echo $logo; ?></url>
<link><?php echo $link; ?></link> <link><?php echo $link; ?></link>
<width>144</width> <width>144</width>
@ -39,8 +39,8 @@ echo'<?xml version="1.0" encoding="UTF-8"?>';
} }
?> ?>
<item> <item>
<title><?php echo htmlentities($row['title']); ?></title> <title><?php echo feedText($row['title']); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($row['description']))); ?></description> <description><?php echo feedText($row['description']); ?></description>
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link> <link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
<?php echo $enclosure; ?> <?php echo $enclosure; ?>
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate> <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/"> xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel> <channel>
<atom:link href="<?php echo $global['webSiteRootURL'].ltrim($_SERVER["REQUEST_URI"],"/"); ?>" rel="self" type="application/rss+xml" /> <atom:link href="<?php echo $global['webSiteRootURL'].ltrim($_SERVER["REQUEST_URI"],"/"); ?>" rel="self" type="application/rss+xml" />
<title><?php echo htmlentities($title); ?></title> <title><?php echo feedText($title); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($description))); ?></description> <description><?php echo feedText($description); ?></description>
<link><?php echo $link; ?></link> <link><?php echo $link; ?></link>
<sy:updatePeriod>hourly</sy:updatePeriod> <sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency> <sy:updateFrequency>1</sy:updateFrequency>
<image> <image>
<title><?php echo $title; ?></title> <title><?php echo feedText($title); ?></title>
<url><?php echo $logo; ?></url> <url><?php echo $logo; ?></url>
<link><?php echo $link; ?></link> <link><?php echo $link; ?></link>
<width>144</width> <width>144</width>
@ -41,8 +41,8 @@ echo'<?xml version="1.0" encoding="UTF-8"?>'
} }
?> ?>
<item> <item>
<title><?php echo htmlentities($row['title']); ?></title> <title><?php echo feedText($row['title']); ?></title>
<description><?php echo htmlentities(strip_tags(br2nl($row['description']))); ?></description> <description><?php echo feedText($row['description']); ?></description>
<link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link> <link> <?php echo Video::getLink($row['id'], $row['clean_title']); ?></link>
<?php echo $enclosure; ?> <?php echo $enclosure; ?>
<pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate> <pubDate><?php echo date('r', strtotime($row['created'])); ?></pubDate>