Commit a3053eb8 authored by Christophe Massiot's avatar Christophe Massiot

* include/network.h:vlc_UrlEncode() : though RFC 1738 allows to send

   $-_.+!*'(), 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.
parent 28480679
......@@ -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
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment