From dfb337be156aa191feba8fadab57359df4caca96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Mon, 20 Jul 2009 15:01:20 +0000 Subject: [PATCH] Sanitized a little bit the generated HTML. --- authfail.c | 8 ++-- css.c | 5 ++- dansguardian_report.c | 10 ++--- denied.c | 10 ++--- documentation/conf.txt | 19 +++++++++ documentation/util.txt | 20 ++++++++++ download.c | 34 +++++++++-------- html.c | 87 ++++++++++++++++++++---------------------- include/defs.h | 2 + realtime.c | 6 +-- repday.c | 75 ++++++++++++++++-------------------- report.c | 10 ++--- siteuser.c | 28 +++++++------- smartfilter.c | 36 ++++++++--------- squidguard_report.c | 10 ++--- topsites.c | 14 +++---- topuser.c | 80 ++++++++++++++++++++++---------------- useragent.c | 22 +++++------ util.c | 70 ++++++++++++++++++++++++--------- 19 files changed, 313 insertions(+), 233 deletions(-) diff --git a/authfail.c b/authfail.c index ec000eb..8d5a573 100644 --- a/authfail.c +++ b/authfail.c @@ -94,20 +94,20 @@ void authfail_report(void) fputs("\n",fp_ou); if(strlen(FontFace) > 0) fprintf(fp_ou,"\n",FontFace); fprintf(fp_ou,"\n",BgColor,TxColor,BgImage); - if(strlen(LogoImage) > 0) fprintf(fp_ou, "
\n\n\n
 %s
\n",LogoImage,Width,Height,LogoText); + write_logo_image(fp_ou); if(strcmp(IndexTree,"date") == 0) show_sarg(fp_ou, "../../.."); else show_sarg(fp_ou,".."); - fputs("
\n",fp_ou); + fputs("
\n",fp_ou); fprintf(fp_ou,"\n",Title); fprintf(fp_ou,"\n",text[89],period); fprintf(fp_ou,"\n",text[117]); - fputs("
%s
%s: %s
%s
\n",fp_ou); + fputs("\n",fp_ou); - fputs("
\n",fp_ou); + fputs("
\n",fp_ou); fputs("\n",fp_ou); fputs("\n",fp_ou); fputs("\n",fp_ou); diff --git a/css.c b/css.c index ed94893..f22408d 100644 --- a/css.c +++ b/css.c @@ -43,7 +43,10 @@ void css(FILE *fp_css) return; } - fprintf(fp_css,"