function checkPathParsed (uri) {
  if (uri.charAt(0) !== '/') {
    uri = '/' + uri;
  }
  var safeUrl;
  var myUrl = parseURL(uri);
  if (myUrl.pathname.charAt(myUrl.pathname.length-1) === '/') {
    myUrl.pathname = myUrl.pathname.slice(0, -1);
    safeUrl = myUrl.pathname;
  }
  return safeUrl;
}

function checkPathParsed (uri) {
  if (uri.charAt(0) !== '/') {
    uri = '/' + uri;
  }
  var myUrl = parseURL(uri);
  var safeUrl = myUrl.pathname;
  if (safeUrl.charAt(safeUrl.length-1) === '/') {
    safeUrl = safeUrl.slice(0, -1);
  }
  return safeUrl;
}

Check path for safe uri
Check path for safe uri
