MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / url_encode

Function url_encode

src/commands/evaluate.rs:170–183  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

168}
169
170fn url_encode(input: &str) -> String {
171 let mut encoded = String::new();
172 for b in input.bytes() {
173 match b {
174 b'a'..=b'z' | b'A'..=b'Z' | b'0'..=b'9' | b'-' | b'_' | b'.' | b'~' => {
175 encoded.push(b as char);
176 }
177 _ => {
178 encoded.push_str(&format!("%{:02X}", b));
179 }
180 }
181 }
182 encoded
183}
184
185/// Extract the `@url` / `@navigate` auto-navigation target from a script's
186/// leading comment block, if present.

Callers 1

run_scriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected