]> git.sesse.net Git - vlc/commitdiff
Subtitles: font attributes can use ''
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 29 Apr 2012 19:40:17 +0000 (21:40 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 29 Apr 2012 20:48:24 +0000 (22:48 +0200)
Ref #6720

modules/codec/subsdec.c

index 5c32d4030f5c6bd05572707c34ce0c210f8aa69f..a69bcf0eb032f6640b2ec6bdaa27afc52f462b4c 100644 (file)
@@ -666,6 +666,11 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
                                 psz_subtitle++;
                                 i_len = strcspn( psz_subtitle, "\"" );
                             }
+                            else if( *psz_subtitle == '\'' )
+                            {
+                                psz_subtitle++;
+                                i_len = strcspn( psz_subtitle, "'" );
+                            }
                             else
                             {
                                 i_len = strcspn( psz_subtitle, " \t>" );
@@ -675,7 +680,7 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
                             HtmlPut( &psz_html, "\"" );
 
                             psz_subtitle += i_len;
-                            if( *psz_subtitle == '\"' )
+                            if( *psz_subtitle == '\"' || *psz_subtitle == '\'' )
                                 psz_subtitle++;
                             break;
                         }