$feedtitle = $rss->get_title();
}
echo '<table align="center" width="50%" cellspacing="1">'."\n";
-echo '<tr><td colspan="2"><strong>'. $feedtitle .'</strong></td></tr>'."\n";
+echo '<tr><td colspan="2"><strong>'. s($feedtitle) .'</strong></td></tr>'."\n";
foreach ($rss->get_items() as $item) {
echo '<tr><td valign="middle">'."\n";
- echo '<a href="'. $item->get_link() .'" target="_blank"><strong>'. $item->get_title();
+ echo '<a href="'.$item->get_link().'" target="_blank"><strong>';
+ echo s($item->get_title());
echo '</strong></a>'."\n";
echo '</td>'."\n";
echo '</tr>'."\n";
echo '<tr><td colspan="2"><small>';
- echo $item->get_description() .'</small></td></tr>'."\n";
+ echo format_text($item->get_description(), FORMAT_HTML) .'</small></td></tr>'."\n";
}
echo '</table>'."\n";
// Body.
$o .= format_text($entry->summary, $entry->summaryformat, array('overflowdiv' => true));
- // Uniquehash is used as a link to an external blog.
if (!empty($entry->uniquehash)) {
- $o .= $this->output->container_start('externalblog');
- $o .= html_writer::link($entry->uniquehash, get_string('linktooriginalentry', 'blog'));
- $o .= $this->output->container_end();
+ // Uniquehash is used as a link to an external blog.
+ $url = clean_param($entry->uniquehash, PARAM_URL);
+ if (!empty($url)) {
+ $o .= $this->output->container_start('externalblog');
+ $o .= html_writer::link($url, get_string('linktooriginalentry', 'blog'));
+ $o .= $this->output->container_end();
+ }
}
// Links to tags.