Sindbad~EG File Manager

Current Path : /home/infinitibizsol/autocrm.infinitibizsol.com/node_modules/underscore.string/
Upload File :
Current File : /home/infinitibizsol/autocrm.infinitibizsol.com/node_modules/underscore.string/unescapeHTML.js

var makeString = require('./helper/makeString');
var htmlEntities = require('./helper/htmlEntities');

module.exports = function unescapeHTML(str) {
  return makeString(str).replace(/\&([^;]{1,10});/g, function(entity, entityCode) {
    var match;

    if (entityCode in htmlEntities) {
      return htmlEntities[entityCode];
    /*eslint no-cond-assign: 0*/
    } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) {
      return String.fromCharCode(parseInt(match[1], 16));
    /*eslint no-cond-assign: 0*/
    } else if (match = entityCode.match(/^#(\d+)$/)) {
      return String.fromCharCode(~~match[1]);
    } else {
      return entity;
    }
  });
};

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists