From 1f77b286910fdd8573fb72b2a45e5a5498342f3b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 8 Mar 2017 14:37:14 -0500 Subject: [PATCH] markup.c: markup_unquote(): Unquote things in the correct order Because "&" is not the last character to be unescaped, it is possible that the lines for "<" and ">" expand some things they shouldn't. For example, "&lt;" should become "<", but instead it becomes ">". While this is unlikely to appear naturally in a notification, it is wrong. --- src/markup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markup.c b/src/markup.c index 6ff1014..05ef1ff 100644 --- a/src/markup.c +++ b/src/markup.c @@ -28,9 +28,9 @@ static char *markup_unquote(char *str) str = string_replace_all(""", "\"", str); str = string_replace_all("'", "'", str); - str = string_replace_all("&", "&", str); str = string_replace_all("<", "<", str); str = string_replace_all(">", ">", str); + str = string_replace_all("&", "&", str); return str; }