added check for null value in story.title

This commit is contained in:
Tobi Schäfer 2002-07-29 14:11:35 +00:00
parent fc4b22ebf2
commit 090117beda

View file

@ -17,14 +17,14 @@ if (max > 0 && this.online) {
for (var i=0; i<max; i++) {
var story = this.allstories.get(i);
param1.itemUrl = story.href();
param1.itemTitle = encodeXml(story.getContentPart("title"));
param1.itemTitle = story.title ? encodeXml(story.title) : "";
param1.authorName = encodeXml(story.creator.name);
param1.authorMail = encodeXml(story.creator.email);
param1.year = now.getYear();
param1.subject = story.topic ? encodeXml(story.topic) : "";
param1.date = story.modifytime.format(w3fmt);
var skin = createSkin(story.getContentPart("text"));
var str = this.renderSkinAsString(skin);
# var str = renderTextPreviewAsString(this.renderSkinAsString(skin), 250, "...");
str = this.rssConvertHtmlImageToHtmlLink(str);
param1.itemDescription = encodeXml(str);
param2.items += renderSkinAsString("rss10Item", param1);