Commit 4ec2f036 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Factorize identical XML escape RPN functions

parent 443cd08b
......@@ -365,7 +365,8 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
SSPush( st, value );
free( value );
}
else if( !strcmp( s, "xml_encode" ) )
else if( !strcmp( s, "xml_encode" )
|| !strcmp( s, "htmlspecialchars" ) )
{
char *url = SSPop( st );
char *value = convert_xml_special_chars( url );
......@@ -418,17 +419,6 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
free( psz_src );
free( psz_dest );
}
else if( !strcmp( s, "htmlspecialchars" ) )
{
char *psz_src = SSPop( st );
char *psz_dest;
psz_dest = convert_xml_special_chars( psz_src );
SSPush( st, psz_dest );
free( psz_src );
free( psz_dest );
}
else if( !strcmp( s, "realpath" ) )
{
char *psz_src = SSPop( st );
......
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