<commit_before>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;
}<commit_msg>Check path for safe uri<commit_after>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;
}
{'fraction_non_alphanumeric': 0.18780096308186195, 'fraction_numerical': 0.012841091492776886, 'mean_word_length': 3.2162162162162162, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5896709', 'n_tokens_mistral': 250, 'n_tokens_neox': 248, 'n_words': 45}