code: function isSafeString(str) {
        var escape = ['&amp;', '&lt;', '&gt;', '&quot;', '&#x27;', '&#96;'];
        if (typeof str !== "string" || (escape.some(function(specialChar) {
          return str.indexOf(specialChar) >= 0;
        }))) {
          return true;
        }
      }
docs: isSafeString - Checks if special characters in strings have already been escaped.
  
  @param  {string} str               The string to check.
  @return {boolean}