Skip to content
Snippets Groups Projects
Commit 2749f071 authored by runemaster's avatar runemaster
Browse files

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?
parent d17ce562
No related branches found
No related tags found
No related merge requests found
......@@ -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 + '&amp;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 + '&amp;message=' + hdr.number + '</link>');
channel.sub + '&amp;message=' + hdr.number + '</link>');
writeln('\t\t\t</item>');
msgs++;
if(msgs>=channel.maxmessages)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment