Hello. On Thu, 2014-03-27 at 20:38, Davide Andreoli wrote: > 2014-03-27 12:52 GMT+01:00 Stefan Schmidt <[email protected]>: > > > stefan pushed a commit to branch master. > > > > > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=ca07e7d505274377635fda2a79d8ac8c61877ea6 > > > > commit ca07e7d505274377635fda2a79d8ac8c61877ea6 > > Author: Stefan Schmidt <[email protected]> > > Date: Thu Mar 27 12:47:21 2014 +0100 > > > > bugfix: music_control: Use correct markup for metadata text. > > > > We piped the plain metadata text to edje TEXTBLOCK which might > > interpret > > some of the characters as markup. Better convert it to the correct > > markup > > first. The actual bug case was a & in the metadata cut off the rest of > > the text. Now we get the correct & before sending it of to edje. > > > > Fixes T1061 > > --- > > src/modules/music-control/e_mod_main.c | 11 +++++++---- > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > diff --git a/src/modules/music-control/e_mod_main.c > > b/src/modules/music-control/e_mod_main.c > > index 58bf32f..b8e7244 100644 > > --- a/src/modules/music-control/e_mod_main.c > > +++ b/src/modules/music-control/e_mod_main.c > > @@ -224,7 +224,7 @@ parse_metadata(E_Music_Control_Module_Context *ctxt, > > Eina_Value *array) > > > > for (i = 0; i < eina_value_array_count(array); i++) > > { > > - const char *key, *str_val; > > + const char *key, *str_val, *str_markup; > > Eina_Value st, subst; > > Efreet_Uri *uri; > > > > @@ -234,14 +234,16 @@ parse_metadata(E_Music_Control_Module_Context *ctxt, > > Eina_Value *array) > > { > > eina_value_struct_value_get(&st, "arg1", &subst); > > eina_value_struct_get(&subst, "arg0", &str_val); > > - ctxt->meta_title = eina_stringshare_add(str_val); > > + str_markup = evas_textblock_text_utf8_to_markup(NULL, > > str_val); > > + ctxt->meta_title = eina_stringshare_add(str_markup); > > eina_value_flush(&subst); > > > > I think that the string returned by evas_textblock_text_utf8_to_markup() > must > be freed after usage. Aren't you leaking 3 times in this case?
Nicely spotted. I do indeed. Was to focused on getting the markup right that I ignored that the returned string comes from a eina_strbuf_string_steal in the end and we need to handle the free'ing. Thanks for having an eye on it. Fixed now in master and also the e18 branch. regards Stefan Schmidt ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
