Permalink
Browse files

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

  • Loading branch information...
1 parent 09288e5 commit 02c73597973729ccc144bc3f56d0c6b423ad9d6c @ifsnop committed Jul 20, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 demo/index.php
View
9 demo/index.php
@@ -196,7 +196,14 @@
<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(); ?>

0 comments on commit 02c7359

Please sign in to comment.