Unescape and unquote the path. Ready for translation.
357819
private static String clearPath(String path) {
        try {
            ExpressionBaseState state = new ExpressionBaseState("EXPR", true, false);
            if (Util.isWindows()) {
                // to not require escaping FS name separator
                state.setDefaultHandler(WordCharacterHandler.IGNORE_LB_ESCAPE_OFF);
            } else {
                state.setDefaultHandler(WordCharacterHandler.IGNORE_LB_ESCAPE_ON);
            }
            // Remove escaping characters
            path = ArgumentWithValue.resolveValue(path, state);
        } catch (CommandFormatException ex) {
            // XXX OK, continue translation
        }
        // Remove quote to retrieve candidates.
        if (path.startsWith("\"")) {
            path = path.substring(1);
        }
        // Could be an escaped " character. We don't take into account this corner case.
        // concider it the end of the quoted part.
        if (path.endsWith("\"")) {
            path = path.substring(0, path.length() - 1);
        }
        return path;
    }
761558
def format_path(p, quote_spaces=False):
    """"""
    if b'\n' in p:
        p = re.sub(b'\n', b'\\n', p)
        quote = True
    else:
        quote = p[0] == b'"' or (quote_spaces and b' ' in p)
    if quote:
        extra = GIT_FAST_IMPORT_NEEDS_EXTRA_SPACE_AFTER_QUOTE and b' ' or b''
        p = b'"' + p + b'"' + extra
    return p
138392
function strip(path) {
    var cur;
    var next;
    var str = '';

    for (var i = 0; i < path.length; i++) {
        cur = path.charAt(i);

        if (i !== path.length - 1) {
            next = path.charAt(i + 1);
        }

        if (cur === '/' && (next === '/' || (next === '?' && i > 0))) {
            continue;
        }

        str += cur;
    }

    return (str);
}
1073661
function () {
                var resolvedPath = '', resolvedPathStr, i, args = arguments, path, absolute = 0;
                for (i = args.length - 1; i >= 0 && !absolute; i--) {
                    path = args[i];
                    if (typeof path !== 'string' || !path) {
                        continue;
                    }
                    resolvedPath = path + '/' + resolvedPath;
                    absolute = path.charAt(0) === '/';
                }
                resolvedPathStr = normalizeArray(splitPathToArray(resolvedPath), !absolute).join('/');
                return (absolute ? '/' : '') + resolvedPathStr || '.';
            }
1085578
def unescape(s, quote=False):
    
    s = s.replace('&lt;', '<')
    s = s.replace('&gt;', '>')
    if quote:
        s = s.replace('&quot;', '"')
    s = s.replace('&amp;', '&')
    return s
976071
def resolve_frompath(pkgpath, relpath, level=0):
    """"""
    if level == 0:
        return relpath
    parts = pkgpath.split('.') + ['_']
    parts = parts[:-level] + (relpath.split('.') if relpath else [])
    return '.'.join(parts)
255959
def unprefix(self, path):
        """"""
        path = self.strip(path)
        if isinstance(path, six.string_types):
            path = path[len(self.prefix_):] if path.startswith(self.prefix_) else path
            path = path[1:] if path.startswith(self.separator) else path
            return path
        if isinstance(path, (list, tuple)):
            path = [p[len(self.prefix_):] if p.startswith(self.prefix_) else p for p in path]
            path = [p[1:] if p.startswith(self.separator) else p for p in path]
            return path
84153
function unesc(string) {
    return string.replace(/\\"/g, '"').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\t/g, '\t').replace(/\\\\/g, '\\');
}
637550
function () {
            var resolvedPath = '',
                resolvedPathStr,
                i,
                args = (arguments),
                path,
                absolute = 0;

            for (i = args.length - 1; i >= 0 && !absolute; i--) {
                path = args[i];
                if (typeof path != 'string' || !path) {
                    continue;
                }
                resolvedPath = path + '/' + resolvedPath;
                absolute = path.charAt(0) == '/';
            }

            resolvedPathStr = normalizeArray(S.filter(resolvedPath.split('/'), function (p) {
                return !!p;
            }), !absolute).join('/');

            return ((absolute ? '/' : '') + resolvedPathStr) || '.';
        }
77440
function unsetPath(path, obj) {
  if(!isArray(path) || isEmpty(path)) {
    throw new TypeError(pathError)
  }

  if(!(isObject(obj) || isArray(obj))) {
    return obj
  }

  const key = path[0]

  if(!(isString(key) && !isEmpty(key) || isInteger(key) && key >= 0)) {
    throw new TypeError(pathError)
  }

  if(path.length === 1) {
    if(isArray(obj) && isInteger(key)) {
      return array.unset(key, obj)
    }

    if(isObject(obj) && isString(key)) {
      return object.unset(key, obj)
    }

    return obj
  }

  const next =
    obj[key]

  if(!(isObject(next) || isArray(next))) {
    return obj
  }

  if(isArray(obj)) {
    return array.set(key, unsetPath(path.slice(1), next), obj)
  }

  return object.set(key, unsetPath(path.slice(1), next), obj)
}
443157
function normalizePath(path, reg, rExt) {
  return path
    .replace(reg, '')
    .replace(/[:*?"<>|]/g, '_') + rExt;
}
546849
def doTranslate(option, urlOrPaths, serverEndpoint=ServerEndpoint, verbose=Verbose, tikaServerJar=TikaServerJar, 
                responseMimeType='text/plain',
                services={'all': '/translate/all'}):
    '''
    
    '''
    paths = getPaths(urlOrPaths)
    return [doTranslate1(option, path, serverEndpoint, verbose, tikaServerJar, responseMimeType, services)
            for path in paths]
472676
private Object js_unescape(Object[] args)
    {
        String s = ScriptRuntime.toString(args, 0);
        int firstEscapePos = s.indexOf('%');
        if (firstEscapePos >= 0) {
            int L = s.length();
            char[] buf = s.toCharArray();
            int destination = firstEscapePos;
            for (int k = firstEscapePos; k != L;) {
                char c = buf[k];
                ++k;
                if (c == '%' && k != L) {
                    int end, start;
                    if (buf[k] == 'u') {
                        start = k + 1;
                        end = k + 5;
                    } else {
                        start = k;
                        end = k + 2;
                    }
                    if (end <= L) {
                        int x = 0;
                        for (int i = start; i != end; ++i) {
                            x = Kit.xDigitToInt(buf[i], x);
                        }
                        if (x >= 0) {
                            c = (char)x;
                            k = end;
                        }
                    }
                }
                buf[destination] = c;
                ++destination;
            }
            s = new String(buf, 0, destination);
        }
        return s;
    }
175685
function (path) {
			
			var series = this,
				even = false, // while loop reads from the end
				xAxis = series.xAxis,
				yAxis = series.yAxis,
				i;
				
			// Preserve the original
			path = [].concat(path);
				
			// Do the translation
			i = path.length;
			while (i--) {
				if (typeof path[i] === 'number') {
					if (even) { // even = x
						path[i] = Math.round(xAxis.translate(path[i]));
					} else { // odd = Y
						path[i] = Math.round(yAxis.len - yAxis.translate(path[i]));
					}
					even = !even;
				}
			}
			return path;
		}
1305309
function deInterpolate(path) {
            var newPath = [];

            for (var i = 0, l = path.length; i < l; i++) {
                var next = i === l - 1 ? 0 : i + 1;
                var prev = i === 0 ? l - 1 : i - 1;
                // 插值
                if (
                    !path[prev].onCurve && path[i].onCurve && !path[next].onCurve
                    && Math.abs(2 * path[i].x - path[prev].x - path[next].x) < 0.001
                    && Math.abs(2 * path[i].y - path[prev].y - path[next].y) < 0.001
                ) {
                    continue;
                }

                newPath.push(path[i]);
            }

            return newPath;
        }
69719
function unescape(str) {
        return str.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&#x27;/g, '\'').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&#x2F;/g, '/').replace(/&#x5C;/g, '\\').replace(/&#96;/g, '`');
    }
471802
def unescape(b, encoding):
    ''''''
    return string_literal_re.sub(
        lambda m: unescape_string_literal(m.group(), encoding),
        b
    )