Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Issue #191 Some remarks about poor programming practices... #221

Merged
merged 8 commits into from Oct 11, 2012
View
@@ -196,7 +196,17 @@
<div class="chunk focus" align="center">
<!-- If the feed has a link back to the site that publishes it (which 99% of them do), link the feed's title to it. -->
- <h3 class="header"><?php if ($feed->get_link()) echo '<a href="' . $feed->get_link() . '">'; echo $feed->get_title(); if ($feed->get_link()) echo '</a>'; ?></h3>
+ <h3 class="header">
+ <?php
+ $link = $feed->get_link();
+ $title = $feed->get_title();
+ if ($link)
+ {
+ $title = "<a href='$link' title='$title'>$title</a>";
+ }
+ echo $title;
+ ?>
+ </h3>
<!-- If the feed has a description, display it. -->
<?php echo $feed->get_description(); ?>