Version 1.3 ()
------------------------------------------------------------------------
+ * Atom feeds became invalid, if entry has href or src attributes
+ containing char represented by XML Entities normaly
+ (like href="test.de?a=1&b=2")
+ (brockhaus)
+
* The recent entries sidebar plugin shiped with s9y listed entries
not accessable by the current user because of right restrictions.
(brockhaus)
* (beta4) Fix comment-RSS feeds
- * (beta4) serendipity_plugin_comments now also supports Favatars in
- combination with serendipity_event_gravatar instead of
+ * (beta4) serendipity_plugin_comments now also supports Favatars and
+ Pavatars in combination with serendipity_event_gravatar instead of
Gravatars only. (brockhaus)
* (beta4) Fix wrong event hook for entry manager to display toolbar
$ext = '';
}
- $addData = array('from' => 'functions_entries:printEntries_rss');
+ $addData = array('from' => 'functions_entries:printEntries_rss','rss_options' => $options);
serendipity_plugin_api::hook_event('frontend_display', $entry, $addData);
+
// Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (<a>, <img>, ...) references to only the serendipitypath with the full baseURL URI
// garvin: Could impose some problems. Closely watch this one.
$entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')(.*)>@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6>', $entry['body']);
case 'atom0.3':
$entry_hook = 'frontend_display:atom-0.3:per_entry';
+ $hrefPattern = '@(href|src)\s*?="(.*?)"@si';
+ $entry['feed_body'] = preg_replace_callback($hrefPattern, _hrefsrcEntityReplacer, $entry['feed_body']);
+ $entry['feed_ext'] = preg_replace_callback($hrefPattern, _hrefsrcEntityReplacer, $entry['feed_ext']);
break;
case 'atom1.0':
- $entry_hook = 'frontend_display:atom-1.0:per_entry';
+ $entry_hook = 'frontend_display:atom-1.0:per_entry';
+ $hrefPattern = '@(href|src)\s*?="(.*?)"@si';
+ $entry['feed_body'] = preg_replace_callback($hrefPattern, _hrefsrcEntityReplacer, $entry['feed_body']);
+ $entry['feed_ext'] = preg_replace_callback($hrefPattern, _hrefsrcEntityReplacer, $entry['feed_ext']);
break;
}
$entry['per_entry_display_dat'] = $entry['display_dat'];
}
}
+
+}
+
+function _hrefsrcEntityReplacer($treffer){
+ return $treffer[1] . '="' . htmlspecialchars($treffer[2]) . '"';
}
+