]> git.sesse.net Git - vlc/commitdiff
* include/network.h:vlc_UrlEncode() : though RFC 1738 allows to send
authorChristophe Massiot <massiot@videolan.org>
Thu, 11 Aug 2005 12:23:14 +0000 (12:23 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 11 Aug 2005 12:23:14 +0000 (12:23 +0000)
   $-_.+!*'(), unencoded, it also allows to encode any character. It is
   generally considered a good practive to urlencode $+!*'() because
   some buggy browsers (read: M$) have a problem with those characters.
   See the comments in http://fr.php.net/manual/en/function.rawurlencode.php
   for more information.

include/network.h
src/input/input.c

index ef7a2237c36d77d0488701d2ec83fea2c4930eb0..8a2a53610eec7d849b0acae9a13a2a3480eac070 100644 (file)
@@ -217,8 +217,8 @@ static inline int isurlsafe( int c )
 {
     return ( (unsigned char)( c - 'a' ) < 26 )
         || ( (unsigned char)( c - 'A' ) < 26 )
-        || ( (unsigned char)( c - '9' ) < 10 )
-        || ( strchr( "$-_.+!*'(),", c ) != NULL );
+        || ( (unsigned char)( c - '0' ) < 10 )
+        || ( strchr( "-_.", c ) != NULL );
 }
 
 /*****************************************************************************
@@ -245,7 +245,7 @@ static inline char *vlc_UrlEncode( const char *psz_url )
             *out++ = (char)c;
         else
         {
-            *out++ = '%';   
+            *out++ = '%';
             *out++ = ( ( c >> 4 ) >= 0xA ) ? 'A' + ( c >> 4 ) - 0xA
                                            : '0' + ( c >> 4 );
             *out++ = ( ( c & 0xf ) >= 0xA ) ? 'A' + ( c & 0xf ) - 0xA
index e301af5add01276bb875a5d66a6260b8be22908e..f94f8a2aa1cc02c2dba40546138d0be012aa89f4 100644 (file)
@@ -799,7 +799,7 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick )
         var_Get( p_input, "sub-autodetect-file", &val );
         if( val.b_bool )
         {
-           char *psz_autopath = var_GetString( p_input, "sub-autodetect-path" );
+            char *psz_autopath = var_GetString( p_input, "sub-autodetect-path" );
             char **subs = subtitles_Detect( p_input, psz_autopath,
                                             p_input->input.p_item->psz_uri );
             input_source_t *sub;