X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Ffilter-file.html;h=e85aab7246debdd7917f8aa83b97976a183b2748;hp=7bb9f261491f3b13884c16a8d5aaf59ee35a72fa;hb=3eabce711503c99e93ad129326b4183e99dd254d;hpb=6f113c5cca4a173f76c1000a093fc4a8618e3668 diff --git a/doc/webserver/user-manual/filter-file.html b/doc/webserver/user-manual/filter-file.html index 7bb9f261..e85aab72 100644 --- a/doc/webserver/user-manual/filter-file.html +++ b/doc/webserver/user-manual/filter-file.html @@ -1,22 +1,28 @@ +
Privoxy User Manual | Privoxy 3.0.9 User Manual|
---|---|
Prev | Next |
But wait! Didn't the comment say that But wait! Didn't the comment say that all occurrences of "<script", followed by , followed by any text, i.e. it matches the whole page, from the start of the first <script> tag.
"document.referrer". The dot needed to - be escaped, i.e. preceded by a backslash, to take away its special meaning as a joker, and make it just a regular dot. So far, the meaning is: Match from the start of the first <script> tag in a the page, up to, and including, the text "document.referrer", if , if both are present in the page (and appear in that order).
"<script" and the and the first occurrence of .* will - only span the text up to the first "</script>""Not Your Business!" ( (including the quotation marks!), followed by the text remembered as # The status bar is for displaying link targets, not pointless blahblah # -s/window\.status\s*=\s*['"].*?['"]/dUmMy=1/ig construct means: "a single - or a double quote".
. Finally, \1 is + a back-reference to the first parenthesis just like $1 above, + with the difference that in the pattern, a backslash indicates + a back-reference, whereas in the substitute, it's the dollar.So what does this job do? It replaces assignments of single- or double-quoted strings to the # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html # -s/(<body .*)onunload(.*>)/$1never$2/iUOnUnload event binding in the HTML DOM was a in the HTML DOM was a CRIME. When I close a browser window, I want it to close and die. Basta. This job replaces the i option makes the pattern matching - case-insensitive.
[^>]* + instead of .* to prevent the match from exceeding the + <body> tag if it doesn't contain "OnUnload", but the page's + content does.The last example is from the fun department:
"microsoft" - in the page. This prevents links to microsoft.com from being messed, while + in the page. This prevents links to microsoft.com from being trashed, while still replacing the word everywhere else.