From e57751fe0e56d8ee4de6b1d301ecd1b41648839d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Mon, 11 Oct 2021 01:57:38 +0200 Subject: [PATCH] sdtui: skip keywords in XDXF --- src/sdtui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sdtui.c b/src/sdtui.c index 04d7ddb..efdcd2b 100644 --- a/src/sdtui.c +++ b/src/sdtui.c @@ -349,6 +349,7 @@ view_entry_split_add_xdxf (ViewEntry *ve, const gchar *xml) { // Trivially filter out all tags we can't quite handle, // then parse the reduced XML as Pango markup--this seems to work well. + // Given the nature of our display, also skip keyword elements. GString *filtered = g_string_new (""); while (*xml) { @@ -356,7 +357,7 @@ view_entry_split_add_xdxf (ViewEntry *ve, const gchar *xml) if (*xml != '<' || !*(p = xml + 1 + (xml[1] == '/')) || (strchr ("biu", *p) && p[1] == '>') || !(p = strchr (p, '>'))) g_string_append_c (filtered, *xml++); - else + else if (xml[1] != 'k' || xml[2] != '>' || !(xml = strstr (p, ""))) xml = ++p; } view_entry_split_add_pango (ve, filtered->str);