From: garvinhicking Date: Thu, 6 Oct 2005 08:32:12 +0000 (+0000) Subject: fix linebreaks X-Git-Tag: 0.9~83 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bd36bd1e52ec96c6874a696bcca3e42f1f14573e;p=s9y.git fix linebreaks --- diff --git a/include/functions_rss.inc.php b/include/functions_rss.inc.php index 49ce94c..62aacdc 100644 --- a/include/functions_rss.inc.php +++ b/include/functions_rss.inc.php @@ -1,249 +1,249 @@ - $version, - 'comments' => $comments, - 'fullFeed' => $fullFeed, - 'showMail' => $showMail - ); - serendipity_plugin_api::hook_event('frontend_entries_rss', $entries, $options); - - if (is_array($entries)) { - foreach ($entries as $entry) { - $id = (isset($entry['entryid']) && !empty($entry['entryid']) ? $entry['entryid'] : $entry['id']); - $guid = serendipity_rss_getguid($entry, $comments); - $entryLink = serendipity_archiveURL($id, $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])); - if ($comments == true) { - // Display username as part of the title for easier feed-readability - $entry['title'] = $entry['author'] . ': ' . $entry['title']; - } - - // Embed a link to extended entry, if existing - if ($fullFeed) { - $entry['body'] .= ' ' . $entry['extended']; - $ext = ''; - } elseif ($entry['exflag']) { - $ext = '
' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . ''; - } else { - $ext = ''; - } - - serendipity_plugin_api::hook_event('frontend_display', $entry); - // Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (, , ...) 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']); - // jbalcorn: clean up body for XML compliance as best we can. - $entry['body'] = xhtml_cleanup($entry['body']); - - // extract author information - if ((isset($entry['no_email']) && $entry['no_email']) || !$showMail) { - $entry['email'] = 'nospam@example.com'; // RSS Feeds need an E-Mail address! - } elseif (empty($entry['email'])) { - $query = "select email FROM {$serendipity['dbPrefix']}authors WHERE authorid = '". serendipity_db_escape_string($entry['authorid']) ."'"; - $results = serendipity_db_query($query); - $entry['email'] = $results[0]['email']; - } - - if (!is_array($entry['categories'])) { - $entry['categories'] = array(0 => array('category_name' => $entry['category_name'])); - } - - if ($version == 'atom0.3') { - /*********** ATOM 0.3 FEED *************/ -?> - - - - - - - - - - - wfwcomment.php?cid= - - - - rss.php?version=&type=comments&cid= - - - - <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> - - -
- -
-
- -
- - - - - - - - - - - wfwcomment.php?cid= - - - - rss.php?version=&type=comments&cid= - $cat) { - $name = serendipity_utf8_encode(htmlspecialchars($cat['category_name'])); ?> - - - - <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> - - -
- -
-
- -
- - - <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> - - $cat) { - ?> - #comments - wfwcomment.php?cid= - - - rss.php?version=&type=comments&cid= - - - - - - - - - - - - -?> - - - - - - $cat) { - $categories[] = $cat['category_name']; - } - -?> - - <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> - - - - - - - - - - - wfwcomment.php?cid= - - - rss.php?version=&type=comments&cid= - - - - - $version, + 'comments' => $comments, + 'fullFeed' => $fullFeed, + 'showMail' => $showMail + ); + serendipity_plugin_api::hook_event('frontend_entries_rss', $entries, $options); + + if (is_array($entries)) { + foreach ($entries as $entry) { + $id = (isset($entry['entryid']) && !empty($entry['entryid']) ? $entry['entryid'] : $entry['id']); + $guid = serendipity_rss_getguid($entry, $comments); + $entryLink = serendipity_archiveURL($id, $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])); + if ($comments == true) { + // Display username as part of the title for easier feed-readability + $entry['title'] = $entry['author'] . ': ' . $entry['title']; + } + + // Embed a link to extended entry, if existing + if ($fullFeed) { + $entry['body'] .= ' ' . $entry['extended']; + $ext = ''; + } elseif ($entry['exflag']) { + $ext = '
' . sprintf(VIEW_EXTENDED_ENTRY, htmlspecialchars($entry['title'])) . ''; + } else { + $ext = ''; + } + + serendipity_plugin_api::hook_event('frontend_display', $entry); + // Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (, , ...) 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']); + // jbalcorn: clean up body for XML compliance as best we can. + $entry['body'] = xhtml_cleanup($entry['body']); + + // extract author information + if ((isset($entry['no_email']) && $entry['no_email']) || !$showMail) { + $entry['email'] = 'nospam@example.com'; // RSS Feeds need an E-Mail address! + } elseif (empty($entry['email'])) { + $query = "select email FROM {$serendipity['dbPrefix']}authors WHERE authorid = '". serendipity_db_escape_string($entry['authorid']) ."'"; + $results = serendipity_db_query($query); + $entry['email'] = $results[0]['email']; + } + + if (!is_array($entry['categories'])) { + $entry['categories'] = array(0 => array('category_name' => $entry['category_name'])); + } + + if ($version == 'atom0.3') { + /*********** ATOM 0.3 FEED *************/ +?> + + + + + + + + + + + wfwcomment.php?cid= + + + + rss.php?version=&type=comments&cid= + + + + <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> + + +
+ +
+
+ +
+ + + + + + + + + + + wfwcomment.php?cid= + + + + rss.php?version=&type=comments&cid= + $cat) { + $name = serendipity_utf8_encode(htmlspecialchars($cat['category_name'])); ?> + + + + <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> + + +
+ +
+
+ +
+ + + <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> + + $cat) { + ?> + #comments + wfwcomment.php?cid= + + + rss.php?version=&type=comments&cid= + + + + + + + + + + + + +?> + + + + + + $cat) { + $categories[] = $cat['category_name']; + } + +?> + + <?php echo serendipity_utf8_encode(htmlspecialchars($entry['title'])); ?> + + + + + + + + + + + wfwcomment.php?cid= + + + rss.php?version=&type=comments&cid= + + + + +