[vlc-commits] Subtitles: font attributes can use ''

Jean-Baptiste Kempf git at videolan.org
Sun Apr 29 22:48:27 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 29 21:40:17 2012 +0200| [afdbf36588d83320059d400c9a7cf674a15ac257] | committer: Jean-Baptiste Kempf

Subtitles: font attributes can use ''

Ref #6720

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

 modules/codec/subsdec.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index 5c32d40..a69bcf0 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -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;
                         }



More information about the vlc-commits mailing list