if ($data = parse_rss(get_config('blog_rss'))) {
echo ' <ul>' . "\n";
foreach ($data->content as $item) {
- echo ' <li><a href="' . $item->link . '">' . $item->title . '</a></li>' . "\n";;
+ echo ' <li><a href="' . $item->link . '">' . hsc($item->title) . '</a></li>' . "\n";;
}
echo ' <li class="last"><a href="' . get_config('blog_url') . '"> ... more</a></li>' . "\n";
echo ' </ul>' . "\n";
// no nice formatting here, whtespace fucks the browser
echo "\n";
foreach ((array)$photos['photo'] as $photo) {
- echo "<a href=$photos_url$photo[id]>";
- echo "<img border='0' alt='$photo[title]' ".
- "src=" . $f->buildPhotoURL($photo, "Square") . ">";
- echo "</a>";
+ echo '<a href="' . $photos_url . $photo['id'] . '">';
+ echo '<img alt="' . $photo['itle'] . '" ' .
+ 'src="' . $f->buildPhotoURL($photo, 'Square') . '" />';
+ echo '</a>';
$i++;
}
echo "\n";
if ($data = parse_rss('http://ws.audioscrobbler.com/1.0/user/' . get_config('lastfm_username') . '/recenttracks.rss')) {
echo ' <ul>' . "\n";
foreach ($data->content as $item) {
- echo ' <li><a href="' . $item->link . '">' . $item->title . '</a></li>' . "\n";
+ echo ' <li><a href="' . $item->link . '">' . hsc($item->title) . '</a></li>' . "\n";
}
echo ' <li class="last"><a href="http://last.fm/user/' . get_config('lastfm_username') . '/">... more</a></li>' . "\n";
echo ' </ul>' . "\n";
if ($data = parse_rss('http://twitter.com/statuses/user_timeline/' . get_config('twitter_username') . '.rss')) {
echo ' <ul>' . "\n";
foreach ($data->content as $item) {
- echo ' <li><a href="' . $item->link . '">' . substr($item->title, strlen(get_config('twitter_username')) + 2) . '</a></li>' . "\n";
+ echo ' <li><a href="' . $item->link . '">' . hsc(substr($item->title, strlen(get_config('twitter_username')) + 2)) . '</a></li>' . "\n";
}
echo ' <li class="last"><a href="http://twitter.com/' . get_config('twitter_username') . '/">... more</a></li>' . "\n";
echo ' </ul>' . "\n";
?>. christ. at least I never got livejournal.</p>
<p>I don't have an rss feed for this mashup. use friendfeed instead, or an individual site's feed.</p>
<p>thanks to <a href="http://nothing.net.nz">vex</a> for the vserver</p>
- <p><a href="mailto:penny@mjollnir.org">send me email!</a>
+ <p><a href="mailto:penny@mjollnir.org">send me email!</a></p>
<span class="mind"><b>On my mind</b>: <a href="http://mahara.org">mahara</a>, more tattoos, less tattoos, moodle gsoc, Europe</span>
}
return $data;
}
+
+function hsc($str) {
+ return htmlspecialchars($str, ENT_COMPAT, 'UTF-8');
+}
+
?>
}
div#flickr img {
margin:5px;
+ border:0px;
}
div#main {