[tepl/wip/icu: 5/5] metadata: use the wonderful tepl_utils_markup_escape_text()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl/wip/icu: 5/5] metadata: use the wonderful tepl_utils_markup_escape_text()
- Date: Sat, 30 May 2020 11:18:22 +0000 (UTC)
commit 752f8a3b0bff841eadfaf4451323dcc2e7c6ba4f
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri May 29 23:28:56 2020 +0200
metadata: use the wonderful tepl_utils_markup_escape_text()
tepl/tepl-metadata-attic.c | 5 +++--
testsuite/test-metadata-manager.c | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tepl/tepl-metadata-attic.c b/tepl/tepl-metadata-attic.c
index 4061cbe..bc5233d 100644
--- a/tepl/tepl-metadata-attic.c
+++ b/tepl/tepl-metadata-attic.c
@@ -3,6 +3,7 @@
*/
#include "tepl-metadata-attic.h"
+#include "tepl-utils.h"
/* Some metadata put into the attic. */
@@ -131,7 +132,7 @@ append_entries_to_string (TeplMetadataAttic *metadata,
/* No need to escape the key. */
- value_escaped = g_markup_escape_text (value, -1);
+ value_escaped = tepl_utils_markup_escape_text (value);
g_string_append_printf (string,
" <entry key=\"%s\" value=\"%s\"/>\n",
@@ -160,7 +161,7 @@ _tepl_metadata_attic_append_xml_to_string (TeplMetadataAttic *metadata,
}
uri = g_file_get_uri (location);
- uri_escaped = g_markup_escape_text (uri, -1);
+ uri_escaped = tepl_utils_markup_escape_text (uri);
g_string_append_printf (string,
" <document uri=\"%s\" atime=\"%" G_GINT64_FORMAT "\">\n",
diff --git a/testsuite/test-metadata-manager.c b/testsuite/test-metadata-manager.c
index 3acb577..af95d9d 100644
--- a/testsuite/test-metadata-manager.c
+++ b/testsuite/test-metadata-manager.c
@@ -246,7 +246,9 @@ test_value_round_trip (void)
check_value_round_trip (",");
check_value_round_trip (";");
check_value_round_trip (" ");
- //check_value_round_trip ("\t"); // FIXME: fails.
+ check_value_round_trip ("\t");
+ check_value_round_trip (" \t\t \t\noh");
+ check_value_round_trip ("123ASCIIabc.,;/_-:");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]