Hey Hermet,

Good catch. Could you please add a regression test to eina xml to verify 
this issue never comes back, and to prove to everyone (yourself 
included) that it does indeed work at the moment.

Thanks,
Tom.

On 18/06/15 11:51, ChunEon Park wrote:
> hermet pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=d72aa3fecbf9899884fbdb125cdc58ca93792cbb
>
> commit d72aa3fecbf9899884fbdb125cdc58ca93792cbb
> Author: ChunEon Park <[email protected]>
> Date:   Thu Jun 18 19:51:06 2015 +0900
>
>      eina/simple_xml_parser: don't parse the <, > in the attribute string.
>
>      The tag identifier should not be inside of the string "~".
>      Previous logic doesn't care that scenario,
>      the parser context can be corrupted and it will be no more useful.
>
>      @fix
> ---
>   src/lib/eina/eina_simple_xml_parser.c | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/eina/eina_simple_xml_parser.c 
> b/src/lib/eina/eina_simple_xml_parser.c
> index 13dd5ee..d19e217 100644
> --- a/src/lib/eina/eina_simple_xml_parser.c
> +++ b/src/lib/eina/eina_simple_xml_parser.c
> @@ -136,9 +136,16 @@ _eina_simple_xml_tag_start_find(const char *itr, const 
> char *itr_end)
>   static inline const char *
>   _eina_simple_xml_tag_end_find(const char *itr, const char *itr_end)
>   {
> +   Eina_Bool inside_quote = EINA_FALSE;
>      for (; itr < itr_end; itr++)
> -     if ((*itr == '>') || (*itr == '<')) /* consider < also ends a tag */
> -       return itr;
> +     {
> +        if (*itr == '"') inside_quote = !inside_quote;
> +        if (!inside_quote)
> +          {
> +             if ((*itr == '>') || (*itr == '<')) /* consider < also ends a 
> tag */
> +               return itr;
> +          }
> +     }
>      return NULL;
>   }
>
>


------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to