summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-05-16 08:05:42 +0100
committerAndrew Dolgov <[email protected]>2007-05-16 08:05:42 +0100
commit007a38d4c3a8b823325bf6c5ec13f1058ef40ab3 (patch)
tree2beaf12988ab306bc7472c638b938c025de615f2 /viewfeed.js
parentf826eee150ca01f14f20d8a017bac43d8b0f2a04 (diff)
new option: STRIP_UNSAFE_TAGS (utilized)
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js10
1 files changed, 9 insertions, 1 deletions
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 = "<div class='whiteBox'>" + __('Could not update headlines (missing XML data)') + "</div>";
+
+ }
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) {