From 2749f0715bf59785f941e7753da95ea90f0b28e7 Mon Sep 17 00:00:00 2001 From: runemaster <> Date: Tue, 21 Mar 2006 18:45:30 +0000 Subject: [PATCH] Fixed "Bug" whereas channel.name may not equal channel.sub would cause a JS Error that msg_area.sub[sub] had no properties. This bug results from no documentation on rss.ini :) Also (and this seems to be common in RSS Readers) replaced \r\n with <br /> because most RSS Aggregators use HTML and the \r\n was being ignored making an aweful mess of the feed. With the <br /> the page displays well. Is there a better fix? --- web/root/rss.ssjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/root/rss.ssjs b/web/root/rss.ssjs index 36c8f1b4a0..2d4a7afc64 100644 --- a/web/root/rss.ssjs +++ b/web/root/rss.ssjs @@ -128,7 +128,7 @@ if(channel.description==undefined) channel.description =sub.description; if(channel.link==undefined) channel.link =link_root; if(channel.language==undefined) channel.language ='en-us'; -if(channel.image_url==undefined) channel.image_url ='graphics/sync_pbgj1_white_bg.gif'; +if(channel.image_url==undefined) channel.image_url ='http://syncdev.darktech.org:6080//images/nightshade/logo.png'; if(channel.image_title==undefined) channel.image_title =channel.title; if(channel.image_link==undefined) channel.image_link =channel.link; if(channel.maxmessages==undefined) channel.maxmessages =defaults.maxmessages; @@ -172,6 +172,7 @@ if(msgbase.open()) { if(!hdr || hdr.attr&MSG_DELETE) continue; var body = msgbase.get_msg_body(true,total_msgs-i); + body=body.replace(/\r\n/g,'<br />'); if(!body) continue; writeln('\t\t\t<item>'); @@ -185,7 +186,7 @@ if(msgbase.open()) { writeln('\t\t\t\t<link>' + link_root + '&item=' + hdr.number + '</link>'); else // v3.12b writeln('\t\t\t\t<link>' + 'http://' + http_request.header.host + '/msgs/msg.ssjs?msg_sub=' + - channel.name + '&message=' + hdr.number + '</link>'); + channel.sub + '&message=' + hdr.number + '</link>'); writeln('\t\t\t</item>'); msgs++; if(msgs>=channel.maxmessages) -- GitLab