diff -r f4eb5d125e58 -r 607712fb3c66 src/server/plugins/postgresql/service.c --- a/src/server/plugins/postgresql/service.c Thu Jan 27 15:50:42 2022 +0100 +++ b/src/server/plugins/postgresql/service.c Thu Jan 27 18:46:38 2022 +0100 @@ -76,7 +76,12 @@ if(nfields > 0) { net_printf(sn->csd, "\n\n"); for(int i=0;icsd, "\n", PQfname(result, i)); + char *fieldName = PQfname(result, i); + char *fieldNameEscaped = util_html_escape(fieldName); + if(fieldNameEscaped) { + net_printf(sn->csd, "\n", fieldNameEscaped); + FREE(fieldNameEscaped); + } } net_printf(sn->csd, "\n"); @@ -84,7 +89,12 @@ for(int r=0;rcsd, "\n"); for(int c=0;ccsd, "\n", PQgetvalue(result, r, c)); + char *fieldValue = PQgetvalue(result, r, c); + char *fieldValueEscaped = util_html_escape(fieldValue); + if(fieldValueEscaped) { + net_printf(sn->csd, "\n", fieldValueEscaped); + FREE(fieldValueEscaped); + } } net_printf(sn->csd, "\n"); }
%s%s
%s%s