-rw-r--r-- | content/fireflix.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/content/fireflix.js b/content/fireflix.js index 92c42f4..966630c 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -798,10 +798,16 @@ var fireflix = { } }, render_description_frame: function(content) { - if(!content) { - this.searchresult_description.innerHTML = ''; - }else{ - this.searchresult_description.innerHTML = content?content:''; + this.searchresult_description.innerHTML = ''; + if(content) { + var dp = new DOMParser(); + var pd = dp.parseFromString( + '<div xmlns="http://www.w3.org/1999/xhtml">'+content+'</div>', 'text/xml' ); + var de = pd.documentElement; + if(de.tagName=='parsererror') + this.searchresult_description.innerHTML=this.fireflix.loc_strings.getString('broken_description'); + else + this.searchresult_description.appendChild(de); /* of all linking elements flickr only allows a */ var as = this.searchresult_description.getElementsByTagName('a'); for(var a=0;a<as.length;++a) |