Changeset 13895 for trunk/FACT++/www


Ignore:
Timestamp:
05/25/12 23:05:40 (13 years ago)
Author:
tbretz
Message:
Fixed a problem in decodeHtml if the input was empty
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.js

    r13889 r13895  
    165165function valid(str) { if (str==undefined) return false; if (str.length==0) return false; return true;}
    166166function isSliding() { var z = $("body").getAttribute("data-visible"); return $("table"+z).offsetLeft!=0; }
    167 function htmlDecode(input) { var e = $new('div'); e.innerHTML = input; return e.childNodes[0].nodeValue; }
     167function htmlDecode(input) { var e = $new('div'); e.innerHTML = input; return e.firstChild==undefined ? input : e.firstChild.nodeValue; }
    168168function setUTC(el, time) { var str = time.toUTCString(); var utc = str.substr(str.length-12, 8); el.innerHTML = "• "+utc+" UTC •"; }
    169169
Note: See TracChangeset for help on using the changeset viewer.