text: 'use strict';
  
  function escapeHTML(str, escapeQuotes) {
    var span = document.createElement('span');
    span.textContent = str;
  
    if (escapeQuotes)
      return span.innerHTML.replace(/"/g, '&quot;').replace(/'/g, '&#x27;');
    return span.innerHTML;
  }
  
  function formatTime(secs) {
    if (isNaN(secs))
      return;
  
    var formatedTime;
    var seconds = parseInt(secs % 60, 10);
    var minutes = parseInt(secs / 60) % 60;
    var hours = parseInt(secs / 3600) % 24;
  
    if (hours === 0) {
      formatedTime =
        (minutes < 10 ? '0' + minutes : minutes) + ':' +
        (seconds < 10 ? '0' + seconds : seconds);
    } else {
  
      formatedTime =
        (hours < 10 ? '0' + hours : hours) + ':' +
        (minutes < 10 ? '0' + minutes : minutes) + ':' +
        (seconds < 10 ? '0' + seconds : seconds);
    }
  
    return formatedTime;
  }
  