+/*
+ * Whether the given i3String is in Pango markup.
+ */
+bool i3string_is_markup(i3String *str) {
+ return str->pango_markup;
+}
+
+/*
+ * Set whether the i3String should use Pango markup.
+ */
+void i3string_set_markup(i3String *str, bool pango_markup) {
+ str->pango_markup = pango_markup;
+}
+
+/*
+ * Escape pango markup characters in the given string.
+ */
+i3String *i3string_escape_markup(i3String *str) {
+ const char *text = i3string_as_utf8(str);
+ char *escaped = g_markup_escape_text(text, -1);
+ i3String *result = i3string_from_utf8(escaped);
+ free(escaped);
+ return result;
+}
+