- Converts a UTF-8 string into markup(HTML-like) to handle special
characters such as &, <, /, and >/. (There was an issue that the
string composed with an app label contains '&' character couldn't
be displayed properly.)
Change-Id: Ie72f4919472ead9513cdc6d904e3e7fee860040f
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
if (ret == -1) {
throw ErrnoException("asprintf failed");
}
- std::unique_ptr<char, decltype(std::free) *> bufPtr(buf, std::free);
- return std::string(buf);
+ char *markup = elm_entry_utf8_to_markup(buf);
+ free(buf);
+ if (!markup) {
+ ALOGE("markup is NULL");
+ throw ErrnoException("elm_entry_utf8_to_markup failed");
+ }
+ std::unique_ptr<char, decltype(std::free) *> bufPtr(markup, std::free);
+ return std::string(markup);
}
const char *getFormat(enum MsgType type) {