summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorali <ali198724@gmail.com>2020-02-05 16:01:52 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-05 17:41:24 +0100
commit3560b0f62f03c72dac87b244a3f76d6d31fa774b (patch)
tree15900cbbfa481751a66de6ce2c945a19dcc09da3 /src/lib/evas
parent269ed1ca346b79ed08776af429d1f09ab055bf3e (diff)
evas_object_textbox: deal with <br> <tab> without closing '/'
This causes many issues because textbox functions deals with <br> <tab> differently depending that user write them with or without '/' at the end (for example <br> vs <br/>) while most functionaliity are the same (like viewing <br> and <br/> are the same). cursor dealing with these tags can be differently. now we will assume <br> <tab> are already have there own closing tag, even if it is missing Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11293
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 3b4ab026a3..22924df7f9 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -11809,12 +11809,15 @@ _evas_textblock_node_format_new(Efl_Canvas_Textblock_Data *o, const char *_forma
11809 format_len--; /* We don't care about '/' */ 11809 format_len--; /* We don't care about '/' */
11810 n->own_closer = EINA_TRUE; 11810 n->own_closer = EINA_TRUE;
11811 } 11811 }
11812 else if (format_len == 2) 11812 else if (format_len < 4)
11813 { 11813 {
11814 /* br,ps,tab are already own_closer without '/' */
11814 char tmp[format_len + 1]; 11815 char tmp[format_len + 1];
11815 strncpy(tmp, format, format_len); 11816 strncpy(tmp, format, format_len);
11816 tmp[format_len] = '\0'; 11817 tmp[format_len] = '\0';
11817 if (_IS_PARAGRAPH_SEPARATOR(o, tmp)) 11818 if (_IS_PARAGRAPH_SEPARATOR(o, tmp) ||
11819 _IS_LINE_SEPARATOR(tmp) ||
11820 _IS_TAB(tmp))
11818 { 11821 {
11819 n->own_closer = EINA_TRUE; 11822 n->own_closer = EINA_TRUE;
11820 } 11823 }