summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-06-08 16:50:05 +0000
committerDries Buytaert <dries@buytaert.net>2003-06-08 16:50:05 +0000
commita448f5a9b46c5a5e5bcd64072a420bef33161a44 (patch)
tree3b5ac996148f4e2b3547b45a671b00f0fbdb54ba /modules/node.module
parentff914280b9cb8961b26556cb378329e6e3bfda55 (diff)
downloadbrdo-a448f5a9b46c5a5e5bcd64072a420bef33161a44.tar.gz
brdo-a448f5a9b46c5a5e5bcd64072a420bef33161a44.tar.bz2
- Charset simpliciations. Patch #46 by Al.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/node.module b/modules/node.module
index 1bbc95623..c62be185a 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -879,12 +879,11 @@ function node_feed($nodes = 0, $channel = array()) {
while ($node = db_fetch_object($nodes)) {
$item = node_load(array("nid" => $node->nid));
$link = url("node/view/$item->nid");
- $items .= format_rss_item($item->title, $link, $item->teaser);
+ $items .= format_rss_item($item->title, $link, ($item->teaser ? $item->teaser : $item->body));
}
- $output .= "<?xml version=\"1.0\" encoding=\"". variable_get("site_charset", "iso-8859-1") ."\"?>\n";
+ $output .= "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$output .= "<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC \"-//W3C//ENTITIES Latin 1 for XHTML//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent\">]>\n";
- // NOTE: &eacute; - for example - is the correct ISO-8859-1 translation of (e acute) but apparently XML parsers don't (have to) understand it. To solve this problem, we use a DTD that defines commonly used entity such as &eacute;.
if (!$channel["version"]) $channel["version"] = "0.91";
if (!$channel["title"]) $channel["title"] = variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", "");
if (!$channel["link"]) $channel["link"] = $base_url;