Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update encode_uri_component.rs
  • Loading branch information
timneutkens committed Mar 11, 2025
commit 729aa75c1efdd02bf3aad55da490f4f9691bea6d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS};
/// An `AsciiSet` that matches the behavior of JavaScript's `encodeURIComponent`.
/// - It leaves `A-Z a-z 0-9 - _ . ~` unescaped.
/// - It percent-encodes all other ASCII characters (and of course non-ASCII).
/// The `CONTROLS` set covers `\0`-`\x1F` and `\x7F`.
/// - The `CONTROLS` set covers `\0`-`\x1F` and `\x7F`.
const ENCODE_URI_COMPONENT_SET: &AsciiSet = &CONTROLS
// Add everything else JS `encodeURIComponent` would encode:
.add(b' ')
Expand Down
Loading