Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add Url::into_encoded_string #540
I think there may be some confusion here. The
<?php echo '<a href="mycgi?foo=', urlencode($userinput), '">'; ?>
If you want to encode the URL (or some other string) for the purpose of some other format or protocol that happens to also use percent-encoding, the library for that protocol should take care of the encoding. If you’re implementing that protocol yourself, https://crates.io/crates/percent-encoding may be what you’re looking for.