Commit 4390f08b authored by Pierre Lamot's avatar Pierre Lamot Committed by Hugo Beauzée-Luyssen

asx: remove useless test

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit cb751409)
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 4d3165e7
......@@ -356,16 +356,17 @@ end:
/// this looks for patterns like &name; &#DEC; or &#xHEX;
static bool isXmlEncoded(const char* psz_str)
{
assert( psz_str != NULL );
//look for special characters
if( strpbrk(psz_str, "<>'\"") != NULL )
return false;
bool is_escaped = false;
while (psz_str != NULL)
while( true )
{
const char* psz_amp = strchr(psz_str, '&');
if( psz_amp == NULL )
return is_escaped;
break;
const char* psz_end = strchr(psz_amp, ';');
if( psz_end == NULL )
return false;
......@@ -414,6 +415,9 @@ static void memstream_puts_xmlencoded(struct vlc_memstream* p_stream, const char
else
psz_tmp = strndup( psz_begin, psz_end - psz_begin );
if ( psz_tmp == NULL )
return;
if( isXmlEncoded( psz_tmp ) )
vlc_memstream_puts( p_stream, psz_tmp );
else
......
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