Permalink
Browse files

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

  • Loading branch information...
1 parent 712ca6d commit f2f298774381a77f7e38ac2b70d4f9eed78fa9a3 @xbuzz xbuzz committed with jrbasso Jul 29, 2010
Showing with 7 additions and 5 deletions.
  1. +7 −5 cake/libs/view/helpers/rss.php
@@ -208,6 +208,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);
@@ -261,11 +268,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 f2f2987

Please sign in to comment.