Fixed bug #839859: "See why" link URL now gets url-encoded.
authoroes <oes@users.sourceforge.net>
Tue, 11 Nov 2003 13:10:32 +0000 (13:10 +0000)
committeroes <oes@users.sourceforge.net>
Tue, 11 Nov 2003 13:10:32 +0000 (13:10 +0000)
filters.c
templates/blocked

index 31ee85e..1d83e5f 100644 (file)
--- 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)
       {
index d6e3d01..8255fe3 100644 (file)
 #  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:
      document.write('\
    <p class="small" align="center"> \
     <a href="@default-cgi@" target="_blank">Privoxy</a> blocked <b>@protocol@@hostport@@path@</b>. \
-    <br><a href="@default-cgi@show-url-info?url=@hostport@@path@" target="_blank">See why</a> \
+    <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@" target="_blank">See why</a> \
     <!-- @if-force-support-start --> \
     or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
     <!-- if-force-support-end@ --> \
       <td class="box" colspan="2"> \
         <h2>Request for blocked URL</h2> \
         <p>Your request for <b>@protocol@@hostport@@path@</b> was blocked. \
-          <br><a href="@default-cgi@show-url-info?url=@hostport@@path@">See why</a> \
+          <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@">See why</a> \
     <!-- @if-force-support-start --> \
           or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>. \
 <!-- if-force-support-end@ --> \
   <noscript>
    <p class="small" align="center">
     <a href="@default-cgi@" target="_blank">Privoxy</a> blocked <b>@protocol@@hostport@@path@</b>.
-    <br><a href="@default-cgi@show-url-info?url=@hostport@@path@" target="_blank">See why</a>
+    <br><a href="@default-cgi@show-url-info?url=@hostport@@path-ue@" target="_blank">See why</a>
     <!-- @if-force-support-start -->
     or <a href="http://@hostport@@force-prefix@@path@">go there anyway</a>.
     <!-- if-force-support-end@ -->