From 007a38d4c3a8b823325bf6c5ec13f1058ef40ab3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 16 May 2007 08:05:42 +0100 Subject: new option: STRIP_UNSAFE_TAGS (utilized) --- viewfeed.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'viewfeed.js') diff --git a/viewfeed.js b/viewfeed.js index 4942a25cf..c3b28bb80 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -46,7 +46,13 @@ function headlines_callback() { var counters = xmlhttp.responseXML.getElementsByTagName("counters")[0]; var articles = xmlhttp.responseXML.getElementsByTagName("article"); - f.innerHTML = headlines.firstChild.nodeValue; + if (headlines) { + f.innerHTML = headlines.firstChild.nodeValue; + } else { + debug("headlines_callback: returned no data"); + f.innerHTML = "
" + __('Could not update headlines (missing XML data)') + "
"; + + } if (articles) { for (var i = 0; i < articles.length; i++) { @@ -54,6 +60,8 @@ function headlines_callback() { debug("found id: " + a_id); cache_inject(a_id, articles[i].firstChild.nodeValue); } + } else { + debug("no cached articles received"); } if (counters) { -- cgit v1.2.3-54-g00ecf