From b93396e0c058b7daff9753f03a83f564def41302 Mon Sep 17 00:00:00 2001 From: oes Date: Tue, 11 Nov 2003 13:10:32 +0000 Subject: [PATCH] Fixed bug #839859: "See why" link URL now gets url-encoded. --- filters.c | 6 +++++- templates/blocked | 12 +++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/filters.c b/filters.c index 31ee85ed..1d83e5f7 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.58.2.3 2002/09/25 14:51:51 oes Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.58.2.4 2003/02/28 12:52:45 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/Attic/filters.c,v $ @@ -38,6 +38,9 @@ const char filters_rcs[] = "$Id: filters.c,v 1.58.2.3 2002/09/25 14:51:51 oes Ex * * Revisions : * $Log: filters.c,v $ + * Revision 1.58.2.4 2003/02/28 12:52:45 oes + * Fixed a typo + * * Revision 1.58.2.3 2002/09/25 14:51:51 oes * Added basic support for OPTIONS and TRACE HTTP methods: * New function direct_response which handles OPTIONS and @@ -858,6 +861,7 @@ struct http_response *block_url(struct client_state *csp) if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1); if (!err) err = map(exports, "hostport", 1, html_encode(csp->http->hostport), 0); if (!err) err = map(exports, "path", 1, html_encode(csp->http->path), 0); + if (!err) err = map(exports, "path-ue", 1, url_encode(csp->http->path), 0); if (err) { diff --git a/templates/blocked b/templates/blocked index d6e3d018..8255fe3d 100644 --- a/templates/blocked +++ b/templates/blocked @@ -55,9 +55,11 @@ # protocol: # The request's protocol: http:// or https:// # hostport: -# The host and port part of the request that lead to this problem +# The host and port part of the blocked request's URL. # path: -# The path part of the request that lead to this problem +# The path part of the blocked request's URL. +# path-ue: +# The path part of the blocked request's URL, url-encoded. # # # CONDITIONAL SYMBOLS FOR THIS TEMPLATE AND THEIR DEPANDANT SYMBOLS: @@ -142,7 +144,7 @@ document.write('\

\ Privoxy blocked @protocol@@hostport@@path@. \ -
See why \ +
See why \ \ or go there anyway. \ \ @@ -184,7 +186,7 @@ \

Request for blocked URL

\

Your request for @protocol@@hostport@@path@ was blocked. \ -
See why \ +
See why \ \ or go there anyway. \ \ @@ -259,7 +261,7 @@

Privoxy blocked @protocol@@hostport@@path@. -
See why +
See why or go there anyway. -- 2.49.0