X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Furl.c;h=d416fcf7fae38e6ee5b19276773ace45425d41a5;hb=766df9d4e9392045a4e5c730ed81e599b509557a;hp=fea95584626705000ad32d0d0a126fb83a1ee028;hpb=b58816ed33c2f167ce2e199df37fe1749d67605e;p=wget diff --git a/src/url.c b/src/url.c index fea95584..d416fcf7 100644 --- a/src/url.c +++ b/src/url.c @@ -252,6 +252,15 @@ url_escape (const char *s) return url_escape_1 (s, urlchr_unsafe, false); } +/* URL-escape the unsafe and reserved characters (see urlchr_table) in + a given string, returning a freshly allocated string. */ + +char * +url_escape_unsafe_and_reserved (const char *s) +{ + return url_escape_1 (s, urlchr_unsafe|urlchr_reserved, false); +} + /* URL-escape the unsafe characters (see urlchr_table) in a given string. If no characters are unsafe, S is returned. */