From 517ea4053215a3ca51464b42072e1613e2ef8f54 Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Sun, 3 Mar 2013 10:28:02 +0100 Subject: [PATCH] Escape HTML code inside queries. Thanks to denstark for the report. --- pgbadger | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgbadger b/pgbadger index 839964c..b5a0113 100755 --- a/pgbadger +++ b/pgbadger @@ -4469,6 +4469,9 @@ sub highlight_code { my $code = shift; + # Try to escape HTML code + $code =~ s/<([\/a-zA-Z])\b/\<$1/sg; + # prettify SQL query if (!$noprettify) { $sql_prettified->query($code); -- 2.40.0