[vlc-commits] commit: Remove HTML anchor from URI in all cases, not just file:// ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Mar 3 19:52:04 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar  3 19:12:57 2010 +0200| [8d76c39a239f73fe70fd72dbd86ef5c006e1ce7b] | committer: Rémi Denis-Courmont 

Remove HTML anchor from URI in all cases, not just file://

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d76c39a239f73fe70fd72dbd86ef5c006e1ce7b
---

 src/input/input.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 4672cd7..8498bf2 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2405,10 +2405,6 @@ static int InputSourceInit( input_thread_t *p_input,
             }
             psz_path += i_localhost;
         }
-        /* Remove HTML anchor if present (not supported). */
-        char *p = strchr( psz_path, '#' );
-        if( p )
-            *p = '\0';
         /* Then URI-decode the path. */
         decode_URI( psz_path );
 #if defined( WIN32 ) && !defined( UNDER_CE )
@@ -3093,13 +3089,12 @@ void input_SplitMRL( const char **ppsz_access, const char **ppsz_demux,
         *psz_path = '\0';
         psz_path += 3; /* skips "://" */
 
-        /* Separate access from demux (<access>/<demux>://<path>) */
         psz_access = psz_dup;
-
         /* We really don't want module name substitution here! */
         if( psz_access[0] == '$' )
             psz_access++;
 
+        /* Separate access from demux (<access>/<demux>://<path>) */
         char *p = strchr( psz_access, '/' );
         if( p )
         {
@@ -3108,6 +3103,12 @@ void input_SplitMRL( const char **ppsz_access, const char **ppsz_demux,
             if( psz_demux[0] == '$' )
                 psz_demux++;
         }
+
+        /* Remove HTML anchor if present (not supported).
+         * The hash symbol itself should be URI-encoded. */
+        p = strchr( psz_path, '#' );
+        if( p )
+            *p = '\0';
     }
     else
     {



More information about the vlc-commits mailing list