]> git.sesse.net Git - vlc/commitdiff
Don't URL encode ./:[] because they are to be found in URLs...
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 12 Aug 2005 19:44:52 +0000 (19:44 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 12 Aug 2005 19:44:52 +0000 (19:44 +0000)
closes #311

include/network.h

index 8a2a53610eec7d849b0acae9a13a2a3480eac070..cf176df4a710de57e2c8851a1d416b44a3411f74 100644 (file)
@@ -218,7 +218,11 @@ static inline int isurlsafe( int c )
     return ( (unsigned char)( c - 'a' ) < 26 )
         || ( (unsigned char)( c - 'A' ) < 26 )
         || ( (unsigned char)( c - '0' ) < 10 )
-        || ( strchr( "-_.", c ) != NULL );
+        /* Hmm, we should not encode character that are allowed in URLs
+         * (even if they are not URL-safe), nor URL-safe characters.
+         * We still encode some of them because of Microsoft's crap browser.
+         */
+        || ( strchr( "/:.[]-_.", c ) != NULL );
 }
 
 /*****************************************************************************