From 423d0c52674bfa4ec49e4ae8bce645131f657f74 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 16 Feb 2026 11:21:21 +0100 Subject: Fix a few typos (#2231) --- lib/output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/output.c') diff --git a/lib/output.c b/lib/output.c index d650a3c5..d1a8d3b9 100644 --- a/lib/output.c +++ b/lib/output.c @@ -165,7 +165,7 @@ int mp_add_subcheck_to_subcheck(mp_subcheck check[static 1], mp_subcheck subchec void mp_add_summary(mp_check check[static 1], char *summary) { check->summary = summary; } /* - * Generate the summary string of a mp_check object based on it's subchecks + * Generate the summary string of a mp_check object based on its subchecks */ char *get_subcheck_summary(mp_check check) { mp_subcheck_list *subchecks = check.subchecks; @@ -243,7 +243,7 @@ mp_state_enum mp_compute_check_state(const mp_check check) { } /* - * Generate the result state of a mp_check object based on it's own state and it's subchecks states + * Generate the result state of a mp_check object based on its own state and its subchecks states */ mp_state_enum mp_eval_check_default(const mp_check check) { assert(check.subchecks != NULL); // a mp_check without subchecks is invalid, die here -- cgit v1.2.3-74-g34f1 From 2d4f98f50b3470852aea99c61c64cfc11405a8fc Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 16 Mar 2026 12:28:25 +0100 Subject: Remove troublesome symbols from output (#2240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Lorenz Kästle --- lib/output.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/output.c') diff --git a/lib/output.c b/lib/output.c index d1a8d3b9..bfd43195 100644 --- a/lib/output.c +++ b/lib/output.c @@ -259,6 +259,21 @@ mp_state_enum mp_eval_check_default(const mp_check check) { return result; } +// Remove troublesome symbols from plugin output +char *sanitize_output_insitu(char *input) { + if (input == NULL) { + return input; + } + + for (char *walker = input; *walker != '\0'; walker++) { + if (*walker == '|') { + *walker = ' '; + } + } + + return input; +} + /* * Generate output string for a mp_check object * Non static to be available for testing functions @@ -299,6 +314,8 @@ char *mp_fmt_output(mp_check check) { subchecks = subchecks->next; } + result = sanitize_output_insitu(result); + if (pd_string != NULL && strlen(pd_string) > 0) { asprintf(&result, "%s|%s", result, pd_string); } -- cgit v1.2.3-74-g34f1