From 4dde203f0653bebcc345947da1370e24e7ecce92 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 22 Dec 2011 03:32:23 +0000 Subject: [PATCH] fix textblock parsing of tags with stupid trailing spaces like
which people use for some stupid reason SVN revision: 66444 --- legacy/evas/src/lib/canvas/evas_object_textblock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 64f3d27050..0646eb4bdd 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -5173,7 +5173,11 @@ evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) tag_start++; /* Skip the < */ tag_end--; /* Skip the > */ if ((tag_end > tag_start) && (*(tag_end - 1) == '/')) - tag_end --; /* Skip the terminating '/' */ + { + tag_end --; /* Skip the terminating '/' */ + while (*(tag_end - 1) == ' ') + tag_end--; /* skip trailing ' ' */ + } ttag_len = tag_end - tag_start;