Page MenuHomePhabricator

evas_object_textblock: utf8_to_markup support all escapse chars
Needs ReviewPublic

Authored by ali.alzyod on May 7 2019, 3:47 AM.

Details

Summary

update evas_textblock_text_utf8_to_markup to support all escape characters

Test Plan
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include<Eina.h>
#include<Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win,*textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "App");
   elm_win_autodel_set(win, EINA_TRUE);

  textblock = evas_object_textblock_add(win);
  char * aaa = evas_textblock_text_utf8_to_markup(textblock,"A<<>>\"A\'\tA");
  // aaa ==  "A&lt;&lt;&gt;&gt;&quot;A&apos;<tab/>A";
   evas_object_size_hint_weight_set(textblock,EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock,EVAS_HINT_FILL,EVAS_HINT_FILL);
   evas_object_show(textblock);
   
 
   evas_object_move(textblock,0,0);
   evas_object_resize(textblock,320,480);
   evas_object_resize(win,320,480);
   
   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()

Diff Detail

Repository
rEFL core/efl
Branch
arcpatch-D8843_1
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11443
Build 8650: arc lint + arc unit
ali.alzyod created this revision.May 7 2019, 3:47 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

ali.alzyod requested review of this revision.May 7 2019, 3:47 AM
ali.alzyod edited the summary of this revision. (Show Details)May 7 2019, 3:50 AM
ali.alzyod edited the test plan for this revision. (Show Details)
ali.alzyod added reviewers: lauromoura, CHAN, woohyun.

Can you add a testcase that tests all of them ? I think there is none right now.

ali.alzyod updated this revision to Diff 22208.EditedMay 14 2019, 11:04 PM

@bu5hm4n
update test cases, and Fix searching UTF8 instead on unicode

I also fix what I think wrong test case for textblock

ali.alzyod edited the test plan for this revision. (Show Details)May 14 2019, 11:09 PM
bu5hm4n added a subscriber: zmike.Jul 9 2019, 2:04 AM

Conceptionally this looks good to me. However i am wondering about the fact that the testcode is changed here, @zmike can you have a look?

Still applies and test runs cleanly.

Summoning textperts.