Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.5/cloudinary/lib-es5/utils/encoding/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.5/cloudinary/lib-es5/utils/encoding/smart_escape.js

"use strict";

// Based on CGI::unescape. In addition does not escape / :
// smart_escape = (string) => encodeURIComponent(string).replace(/%3A/g, ":").replace(/%2F/g, "/")
function smart_escape(string) {
  var unsafe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : /([^a-zA-Z0-9_.\-\/:]+)/g;

  return string.replace(unsafe, function (match) {
    return match.split("").map(function (c) {
      return "%" + c.charCodeAt(0).toString(16).toUpperCase();
    }).join("");
  });
}

module.exports = smart_escape;

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