aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWoochanlee <wc0917.lee@samsung.com>2019-05-02 14:34:04 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-02 18:14:43 +0200
commitfdfb781e22ba42855ce11b495bfa6145fb48b17a (patch)
treedf0bc140c6c9412ab30722f2ddf0fbcd9add76cd
parentFix for invalid ATSPI role on naviframe page element (diff)
downloadefl-fdfb781e22ba42855ce11b495bfa6145fb48b17a.tar.gz
evas_object_textblock: Fix binary search fail.
https://phab.enlightenment.org/D8610 Makes API Testcase fault. "&lt" is never searching. @fix Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8803
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c4
-rw-r--r--src/tests/evas/evas_test_textblock.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 0913fd30b7..bb8deab1ce 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -1271,8 +1271,8 @@ static const Escape_Value escape_values_e_common_sorted[] = {
ESCAPE_VALUE("&amp;", "\x26"),
ESCAPE_VALUE("&apos;", "\x27"),
ESCAPE_VALUE("&gt;", "\x3e"),
- ESCAPE_VALUE("&quot;", "\x22"),
ESCAPE_VALUE("&lt;", "\x3c"),
+ ESCAPE_VALUE("&quot;", "\x22"),
};
/**
@@ -8185,6 +8185,8 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const char *text)
eina_strbuf_append(sbuf, "&amp;");
else if (ch == '"')
eina_strbuf_append(sbuf, "&quot;");
+ else if (ch == '\'')
+ eina_strbuf_append(sbuf, "&apos;");
else if (ch == _PARAGRAPH_SEPARATOR)
eina_strbuf_append(sbuf, "<ps/>");
else if (ch == _REPLACEMENT_CHAR)
diff --git a/src/tests/evas/evas_test_textblock.c b/src/tests/evas/evas_test_textblock.c
index b82e7e4aaa..dc3f22d136 100644
--- a/src/tests/evas/evas_test_textblock.c
+++ b/src/tests/evas/evas_test_textblock.c
@@ -3241,6 +3241,13 @@ EFL_START_TEST(evas_textblock_text_getters)
fail_if(strcmp(tmp2, "aa"));
free(tmp2);
free(tmp);
+
+ tmp = evas_textblock_text_markup_to_utf8(NULL, "&lt;align=center&gt;hello&lt;/align&gt;&amp;gt;&quot;&apos;");
+ fail_if(strcmp(tmp, "<align=center>hello</align>&gt;\"\'"));
+ tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp);
+ fail_if(strcmp(tmp2, "&lt;align=center&gt;hello&lt;/align&gt;&amp;gt;&quot;&apos;"));
+ free(tmp2);
+ free(tmp);
}
/* complex markup set/get */