Skip to content

Commit

Permalink
added better sanitization to articles layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Walters committed Sep 28, 2009
1 parent c49f9df commit 6861c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions views/modules/articles/articles.ctp
Expand Up @@ -7,9 +7,9 @@
$count = 0;
$dates = array();
foreach ($articless as $row) {
$articleTitle = $row['Datarow']['title'];
$articleUrl = substr($row["Datarow"]["articleId"], strrpos($row["Datarow"]["articleId"], "http://") , 300);
$articleDescription = $row['Datarow']['content'];
$articleTitle = str_replace(array('>','<'),array('&gt;','&lt;'),strip_tags($row['Datarow']['title']));
$articleUrl = substr(htmlentities($row["Datarow"]["articleId"]), strrpos($row["Datarow"]["articleId"], "http://") , 300);
$articleDescription = str_replace(array('>','<'),array('&gt;','&lt;'),strip_tags($row['Datarow']['content']));
$articledate = date('M d, Y', strtotime($row['Datarow']['published']));
$author = $row['Datarow']['author'];
$id = $row['Datarow']['id'];
Expand Down

0 comments on commit 6861c02

Please sign in to comment.