Skip to main content

Module url

Module url 

Source
Expand description

URL escaping for build-time resolvers.

percent-encoding does the work — it is already in the tree under ureq, which does not re-export it. It began in opys-java and moved here when a second resolver needed it: a GitLab project path travels as one segment, group%2Fname.

Functions§

decode_uri_component
Undo encode_uri_component on one path segment. A segment that does not decode to UTF-8 is returned as it was written — it is somebody’s file name, and being wrong about its spelling is worse than leaving it escaped.
encode_uri_component
Escape one path segment or query value, encodeURIComponent-style. Needed wherever a caller’s string reaches a URL: a Temurin release name like jdk-21.0.13+11 has to travel as %2B, or Adoptium reads it as a space and the lookup misses.