From 8535084571a169561ff068c8e3487d5505095d65 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 9 Sep 2010 21:00:25 +0000 Subject: [PATCH] In html_encode(), escape apostrophes so they can't mess up the embedded JavaScript. Reported by dg1727 in #3062296. --- encode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/encode.c b/encode.c index e0237c18..7cf77e81 100644 --- a/encode.c +++ b/encode.c @@ -1,4 +1,4 @@ -const char encode_rcs[] = "$Id: encode.c,v 1.15 2009/05/16 13:27:20 fabiankeil Exp $"; +const char encode_rcs[] = "$Id: encode.c,v 1.16 2010/06/13 12:27:39 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/encode.c,v $ @@ -6,7 +6,7 @@ const char encode_rcs[] = "$Id: encode.c,v 1.15 2009/05/16 13:27:20 fabiankeil E * Purpose : Functions to encode and decode URLs, and also to * encode cookies and HTML text. * - * Copyright : Written by and Copyright (C) 2001 the SourceForge + * Copyright : Written by and Copyright (C) 2001 the * Privoxy team. http://www.privoxy.org/ * * Based on the Internet Junkbuster originally written @@ -81,7 +81,7 @@ static const char * const html_code_map[256] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL,""",NULL,NULL,NULL,"&",NULL, + NULL, NULL, NULL, NULL,""",NULL,NULL,NULL,"&","'", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "<",NULL,">",NULL,NULL, NULL, NULL, NULL, NULL, NULL, -- 2.39.2