-rw-r--r-- | content/fireflix.js | 14 | ||||
-rw-r--r-- | locale/en-US/fireflix.properties | 2 |
2 files changed, 12 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 @@ -789,28 +789,34 @@ var fireflix = { if(! (this.paging.pars && this.paging.page && this.paging.pages) ) { this.search_page.value=''; this.search_page.hidden = true; this.cmd_search_prev_page.setAttribute('disabled','true'); this.cmd_search_next_page.setAttribute('disabled','true'); }else{ this.search_page.value=this.fireflix.loc_strings.getFormattedString('search_page',[this.paging.page,this.paging.pages]); this.search_page.hidden=false; this.cmd_search_prev_page.setAttribute('disabled',(this.paging.page>1)?'false':'true'); this.cmd_search_next_page.setAttribute('disabled',(this.paging.page<this.paging.pages)?'false':'true'); } }, 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) as.item(a).setAttribute('target','_blank'); } }, on_select: function() { if(this.selection.currentIndex<0) { this.searchresult_props.hidden = true; }else{ var p = this.photos[this.selection.currentIndex]; if(!p) { diff --git a/locale/en-US/fireflix.properties b/locale/en-US/fireflix.properties index 18300ff..f583040 100644 --- a/locale/en-US/fireflix.properties +++ b/locale/en-US/fireflix.properties @@ -2,12 +2,14 @@ postUploadPhotoset=Create a new photoset for uploaded photos (cancel if you don' menutitle_Images=Images menutitle_Links=Linked to… urltype_s=Small square (75x75) urltype_t=Thumbnail (fits in 100x100) urltype_m=Small (fits in 240x240) urltype__=Medium (fits in 500x500) urltype_b=Large (fits in 1024x1024) urltype_o=Original image urltype_p=Flickr photo URL search_page=Page %S of %S + +broken_description=Broken photo description |