Encoded path of URL.

        / for absolute URLs without path part.
483608
def raw_path(self):
        
        ret = self._val.path
        if not ret and self.is_absolute():
            ret = "/"
        return ret
1360419
public static String encodePath(String path) {
        if (path != null) {
            path = encodeUrl(path);
            path = path.replaceAll("/jcr:", "/_jcr_");
            path = path.replaceAll("\\?", "%3F");
            path = path.replaceAll("=", "%3D");
            path = path.replaceAll(";", "%3B");
            path = path.replaceAll(":", "%3A");
            path = path.replaceAll("\\+", "%2B");
            path = path.replaceAll("&", "%26");
            path = path.replaceAll("#", "%23");
        }
        return path;
    }
793810
function (url) {
                if (!url)
                    return "";

                var urlParts = url.split("/"),
                    newPath = "";

                for (var i = 0, len = urlParts.length; i < len; i++) {
                    var part = urlParts[i];

                    if (!part || part.length === 0
                        || part.indexOf(":") != -1
                        || part === "."
                        || part === ".."
                        || part === "null"
                        || part === "undefined") {
                        continue;
                    }

                    if (newPath.length !== 0) {
                        newPath = newPath + "/";
                    }

                    newPath = newPath + part;
                }

                return newPath;
            }
455254
def path_to_url(path):
    
    path = os.path.normcase(os.path.abspath(path))
    if _drive_re.match(path):
        path = path[0] + '|' + path[2:]
    url = urllib.quote(path)
    url = url.replace(os.path.sep, '/')
    url = url.lstrip('/')
    return 'file:///' + url
830132
public String getDecodedPath() {
        if (_decodedPath == null && _path != null)
            _decodedPath = URIUtils.decodePath(_path);
        return _decodedPath;
    }
914552
def pathencode (path):
    """"""
    if isinstance(path, unicode) and not os.path.supports_unicode_filenames:
        path = path.encode(FSCODING, "replace")
    return path
277075
function encodePagePath(path) {
  const paths = path.split('/');
  paths.forEach((item, index) => {
    paths[index] = encodeURIComponent(item);
  });
  return paths.join('/');
}
4815
def get_path_url(path, relative=False):
    
    if relative:
        return os.path.relpath(path)
    else:
        return 'file://%s' % os.path.abspath(path)
535898
def build_url(base_url, path):
    
    if absolute_http_url_regexp.match(path):
        return path
    elif base_url:
        return "{}/{}".format(base_url.rstrip("/"), path.lstrip("/"))
    else:
        raise ParamsError("base url missed!")
715623
def safe_url(url):
    """"""
    parsed = urlparse(url)
    if parsed.password is not None:
        pwd = ':%s@' % parsed.password
        url = url.replace(pwd, ':*****@')
    return url
1045630
def uri_from_parts(parts):
    ""
    uri = "%s://%s%s" % (parts[0], parts[1], parts[2])
    if parts[3]:
        extra = '?'+urlencode(parts[3])
        uri += extra
    return uri
934143
function absoluteURI(uri, base) {
    if (uri.substr(0, 2) == './')
      uri = uri.substr(2);

    // absolute urls are left in tact
    if (uri.match(absUrlRegEx) || uri.match(protocolRegEx))
      return uri;
    
    var baseParts = base.split('/');
    var uriParts = uri.split('/');
    
    baseParts.pop();
    
    while (curPart = uriParts.shift())
      if (curPart == '..')
        baseParts.pop();
      else
        baseParts.push(curPart);
    
    return baseParts.join('/');
  }
939837
def request_path(request):
    """"""
    url = request.get_full_url()
    parts = urlsplit(url)
    path = escape_path(parts.path)
    if not path.startswith("/"):
        # fix bad RFC 2396 absoluteURI
        path = "/" + path
    return path
591471
def get_uri_name(url):
    """"""
    url_parsed = urlparse(url)

    url_parts = url_parsed.path.split('/')

    log.info('url parts: %s', url_parts)

    return url_parts[-1]
864222
def url_to_path(url):
    
    assert url.startswith('file:'), (
        "You can only turn file: urls into filenames (not %r)" % url)
    path = url[len('file:'):].lstrip('/')
    path = urllib.unquote(path)
    if _url_drive_re.match(path):
        path = path[0] + ':' + path[2:]
    else:
        path = '/' + path
    return path
285548
def _parse_url(path):
    """"""

    # path changes from bytes to Unicode in going from Python 2 to
    # Python 3.
    if sys.version_info[0] < 3:
        o = urlparse(urllib.parse.unquote_plus(path).decode('utf8'))
    else:
        o = urlparse(urllib.parse.unquote_plus(path))

    path = o.path
    args = {}

    # Convert parse_qs' str --> [str] dictionary to a str --> str
    # dictionary since we never use multi-value GET arguments
    # anyway.
    multiargs = parse_qs(o.query, keep_blank_values=True)
    for arg, value in list(multiargs.items()):
        args[arg] = value[0]

    return path, args
852815
public static String encodePath(String v)
  {
    String encoded = urlPathEscape.escape(v);
    return encoded;
  }