Rebuild HTML docs for 3.0.22 UNSTABLE
[privoxy.git] / doc / webserver / user-manual / filter-file.html
index f01f689..49284e0 100644 (file)
@@ -6,7 +6,7 @@
   <title>Filter Files</title>
   <meta name="GENERATOR" content=
   "Modular DocBook HTML Stylesheet Version 1.79">
-  <link rel="HOME" title="Privoxy 3.0.21 User Manual" href="index.html">
+  <link rel="HOME" title="Privoxy 3.0.22 User Manual" href="index.html">
   <link rel="PREVIOUS" title="Actions Files" href="actions-file.html">
   <link rel="NEXT" title="Privoxy's Template Files" href="templates.html">
   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
@@ -20,7 +20,7 @@
     <table summary="Header navigation table" width="100%" border="0"
     cellpadding="0" cellspacing="0">
       <tr>
-        <th colspan="3" align="center">Privoxy 3.0.21 User Manual</th>
+        <th colspan="3" align="center">Privoxy 3.0.22 User Manual</th>
       </tr>
 
       <tr>
@@ -134,9 +134,28 @@ FILTER: foo Replace all "foo" with "bar"
     "_top">Perl</a>'s <tt class="LITERAL">s///</tt> operator. If you are
     familiar with Perl, you will find this to be quite intuitive, and may
     want to look at the PCRS documentation for the subtle differences to Perl
-    behaviour. Most notably, the non-standard option letter <tt class=
+    behaviour.</p>
+
+    <p>Most notably, the non-standard option letter <tt class=
     "LITERAL">U</tt> is supported, which turns the default to ungreedy
-    matching.</p>
+    matching (add <tt class="LITERAL">?</tt> to quantifiers to turn them
+    greedy again).</p>
+
+    <p>The non-standard option letter <tt class="LITERAL">D</tt> (dynamic)
+    allows to use the variables $host, $origin (the IP address the request
+    came from), $path and $url. They will be replaced with the value they
+    refer to before the filter is executed.</p>
+
+    <p>Note that '$' is a bad choice for a delimiter in a dynamic filter as
+    you might end up with unintended variables if you use a variable name
+    directly after the delimiter. Variables will be resolved without escaping
+    anything, therefore you also have to be careful not to chose delimiters
+    that appear in the replacement text. For example '&lt;' should be save,
+    while '?' will sooner or later cause conflicts with $url.</p>
+
+    <p>The non-standard option letter <tt class="LITERAL">T</tt> (trivial)
+    prevents parsing for backreferences in the substitute. Use it if you want
+    to include text like '$&amp;' in your substitute without quoting.</p>
 
     <p>If you are new to <a href=
     "http://en.wikipedia.org/wiki/Regular_expressions" target=
@@ -151,7 +170,7 @@ FILTER: foo Replace all "foo" with "bar"
     started.</p>
 
     <div class="SECT2">
-      <h2 class="SECT2"><a name="AEN5181" id="AEN5181">9.1. Filter File
+      <h2 class="SECT2"><a name="AEN5208" id="AEN5208">9.1. Filter File
       Tutorial</a></h2>
 
       <p>Now, let's complete our <span class="QUOTE">"foo"</span> content