]> sjero.net Git - wget/blobdiff - src/url.c
Applied Alexander Belopolsky's patch for htmlified FTP listings.
[wget] / src / url.c
index fea95584626705000ad32d0d0a126fb83a1ee028..d416fcf7fae38e6ee5b19276773ace45425d41a5 100644 (file)
--- 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.  */