Permalink
Browse files

Fixed 'convertEntities' to links in RSS. Fixes #959

  • Loading branch information...
xbuzz authored and jrbasso committed Jul 29, 2010
1 parent a59b144 commit 22b7d8279f7cf5b6123c86fc5e856d635a5c189c
Showing with 7 additions and 5 deletions.
  1. +7 −5 cake/libs/view/helpers/rss.php
@@ -194,6 +194,13 @@ function item($att = array(), $elements = array()) {
foreach ($elements as $key => $val) {
$attrib = array();
+
+ $escape = true;
+ if (is_array($val) && isset($val['convertEntities'])) {
+ $escape = $val['convertEntities'];
+ unset($val['convertEntities']);
+ }
+
switch ($key) {
case 'pubDate' :
$val = $this->time($val);
@@ -247,11 +254,6 @@ function item($att = array(), $elements = array()) {
$val = null;
break;
}
- $escape = true;
- if (is_array($val) && isset($val['convertEntities'])) {
- $escape = $val['convertEntities'];
- unset($val['convertEntities']);
- }
if (!is_null($val) && $escape) {
$val = h($val);
}

0 comments on commit 22b7d82

Please sign in to comment.