1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
2 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 <meta name="generator" content="HTML Tidy, see www.w3.org">
9 <meta name="GENERATOR" content=
10 "Modular DocBook HTML Stylesheet Version 1.79">
11 <link rel="HOME" title="Privoxy 3.0.18 User Manual" href="index.html">
12 <link rel="PREVIOUS" title="Actions Files" href="actions-file.html">
13 <link rel="NEXT" title="Privoxy's Template Files" href="templates.html">
14 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
15 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
16 <link rel="STYLESHEET" type="text/css" href="p_doc.css">
17 <style type="text/css">
19 background-color: #EEEEEE;
22 :link { color: #0000FF }
23 :visited { color: #840084 }
24 :active { color: #0000FF }
25 hr.c1 {text-align: left}
29 <div class="NAVHEADER">
30 <table summary="Header navigation table" width="100%" border="0"
31 cellpadding="0" cellspacing="0">
33 <th colspan="3" align="center">
34 Privoxy 3.0.18 User Manual
38 <td width="10%" align="left" valign="bottom">
39 <a href="actions-file.html" accesskey="P">Prev</a>
41 <td width="80%" align="center" valign="bottom">
43 <td width="10%" align="right" valign="bottom">
44 <a href="templates.html" accesskey="N">Next</a>
48 <hr width="100%" class="c1">
52 <a name="FILTER-FILE">9. Filter Files</a>
55 On-the-fly text substitutions need to be defined in a <span class=
56 "QUOTE">"filter file"</span>. Once defined, they can then be invoked
57 as an <span class="QUOTE">"action"</span>.
60 <span class="APPLICATION">Privoxy</span> supports three different
61 filter actions: <tt class="LITERAL"><a href=
62 "actions-file.html#FILTER">filter</a></tt> to rewrite the content
63 that is send to the client, <tt class="LITERAL"><a href=
64 "actions-file.html#CLIENT-HEADER-FILTER">client-header-filter</a></tt>
65 to rewrite headers that are send by the client, and <tt class=
67 "actions-file.html#SERVER-HEADER-FILTER">server-header-filter</a></tt>
68 to rewrite headers that are send by the server.
71 <span class="APPLICATION">Privoxy</span> also supports two tagger
72 actions: <tt class="LITERAL"><a href=
73 "actions-file.html#CLIENT-HEADER-TAGGER">client-header-tagger</a></tt>
74 and <tt class="LITERAL"><a href=
75 "actions-file.html#SERVER-HEADER-TAGGER">server-header-tagger</a></tt>.
76 Taggers and filters use the same syntax in the filter files, the
77 difference is that taggers don't modify the text they are filtering,
78 but use a rewritten version of the filtered text as tag. The tags can
79 then be used to change the applying actions through sections with <a
80 href="actions-file.html#TAG-PATTERN">tag-patterns</a>.
83 Multiple filter files can be defined through the <tt class=
84 "LITERAL"><a href="config.html#FILTERFILE">filterfile</a></tt> config
85 directive. The filters as supplied by the developers are located in
86 <tt class="FILENAME">default.filter</tt>. It is recommended that any
87 locally defined or modified filters go in a separately defined file
88 such as <tt class="FILENAME">user.filter</tt>.
91 Common tasks for content filters are to eliminate common annoyances
92 in HTML and JavaScript, such as pop-up windows, exit consoles,
93 crippled windows without navigation tools, the infamous <BLINK>
94 tag etc, to suppress images with certain width and height attributes
95 (standard banner sizes or web-bugs), or just to have fun.
98 Enabled content filters are applied to any content whose <span class=
99 "QUOTE">"Content Type"</span> header is recognised as a sign of
100 text-based content, with the exception of <tt class=
101 "LITERAL">text/plain</tt>. Use the <a href=
102 "actions-file.html#FORCE-TEXT-MODE">force-text-mode</a> action to
103 also filter other content.
106 Substitutions are made at the source level, so if you want to <span
107 class="QUOTE">"roll your own"</span> filters, you should first be
108 familiar with HTML syntax, and, of course, regular expressions.
111 Just like the <a href="actions-file.html">actions files</a>, the
112 filter file is organized in sections, which are called <span class=
113 "emphasis"><i class="EMPHASIS">filters</i></span> here. Each filter
114 consists of a heading line, that starts with one of the <span class=
115 "emphasis"><i class="EMPHASIS">keywords</i></span> <tt class=
116 "LITERAL">FILTER:</tt>, <tt class=
117 "LITERAL">CLIENT-HEADER-FILTER:</tt> or <tt class=
118 "LITERAL">SERVER-HEADER-FILTER:</tt> followed by the filter's <span
119 class="emphasis"><i class="EMPHASIS">name</i></span>, and a short
120 (one line) <span class="emphasis"><i class=
121 "EMPHASIS">description</i></span> of what it does. Below that line
122 come the <span class="emphasis"><i class="EMPHASIS">jobs</i></span>,
123 i.e. lines that define the actual text substitutions. By convention,
124 the name of a filter should describe what the filter <span class=
125 "emphasis"><i class="EMPHASIS">eliminates</i></span>. The comment is
126 used in the <a href="http://config.privoxy.org/" target=
127 "_top">web-based user interface</a>.
130 Once a filter called <tt class="REPLACEABLE"><i>name</i></tt> has
131 been defined in the filter file, it can be invoked by using an action
132 of the form +<tt class="LITERAL"><a href=
133 "actions-file.html#FILTER">filter</a>{<tt class=
134 "REPLACEABLE"><i>name</i></tt>}</tt> in any <a href=
135 "actions-file.html">actions file</a>.
138 Filter definitions start with a header line that contains the filter
139 type, the filter name and the filter description. A content filter
140 header line for a filter called <span class="QUOTE">"foo"</span>
141 could look like this:
145 <table border="0" bgcolor="#E0E0E0" width="100%">
149 FILTER: foo Replace all "foo" with "bar"
156 Below that line, and up to the next header line, come the jobs that
157 define what text replacements the filter executes. They are specified
158 in a syntax that imitates <a href="http://www.perl.org/" target=
159 "_top">Perl</a>'s <tt class="LITERAL">s///</tt> operator. If you are
160 familiar with Perl, you will find this to be quite intuitive, and may
161 want to look at the PCRS documentation for the subtle differences to
162 Perl behaviour. Most notably, the non-standard option letter <tt
163 class="LITERAL">U</tt> is supported, which turns the default to
167 If you are new to <a href=
168 "http://en.wikipedia.org/wiki/Regular_expressions" target=
169 "_top"><span class="QUOTE">"Regular Expressions"</span></a>, you
170 might want to take a look at the <a href=
171 "appendix.html#REGEX">Appendix on regular expressions</a>, and see
172 the <a href="http://perldoc.perl.org/perlre.html" target="_top">Perl
173 manual</a> for <a href="http://perldoc.perl.org/perlop.html" target=
174 "_top">the <tt class="LITERAL">s///</tt> operator's syntax</a> and <a
175 href="http://perldoc.perl.org/perlre.html" target="_top">Perl-style
176 regular expressions</a> in general. The below examples might also
177 help to get you started.
181 <a name="AEN4903">9.1. Filter File Tutorial</a>
184 Now, let's complete our <span class="QUOTE">"foo"</span> content
185 filter. We have already defined the heading, but the jobs are still
186 missing. Since all it does is to replace <span class=
187 "QUOTE">"foo"</span> with <span class="QUOTE">"bar"</span>, there
188 is only one (trivial) job needed:
192 <table border="0" bgcolor="#E0E0E0" width="100%">
203 But wait! Didn't the comment say that <span class="emphasis"><i
204 class="EMPHASIS">all</i></span> occurrences of <span class=
205 "QUOTE">"foo"</span> should be replaced? Our current job will only
206 take care of the first <span class="QUOTE">"foo"</span> on each
207 page. For global substitution, we'll need to add the <tt class=
208 "LITERAL">g</tt> option:
212 <table border="0" bgcolor="#E0E0E0" width="100%">
223 Our complete filter now looks like this:
227 <table border="0" bgcolor="#E0E0E0" width="100%">
231 FILTER: foo Replace all "foo" with "bar"
239 Let's look at some real filters for more interesting examples. Here
240 you see a filter that protects against some common annoyances that
241 arise from JavaScript abuse. Let's look at its jobs one after the
246 <table border="0" bgcolor="#E0E0E0" width="100%">
250 FILTER: js-annoyances Get rid of particularly annoying JavaScript abuse
252 # Get rid of JavaScript referrer tracking. Test page: http://www.randomoddness.com/untitled.htm
254 s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|Usg
261 Following the header line and a comment, you see the job. Note that
262 it uses <tt class="LITERAL">|</tt> as the delimiter instead of <tt
263 class="LITERAL">/</tt>, because the pattern contains a forward
264 slash, which would otherwise have to be escaped by a backslash (<tt
265 class="LITERAL">\</tt>).
268 Now, let's examine the pattern: it starts with the text <tt class=
269 "LITERAL"><script.*</tt> enclosed in parentheses. Since the dot
270 matches any character, and <tt class="LITERAL">*</tt> means: <span
271 class="QUOTE">"Match an arbitrary number of the element left of
272 myself"</span>, this matches <span class=
273 "QUOTE">"<script"</span>, followed by <span class="emphasis"><i
274 class="EMPHASIS">any</i></span> text, i.e. it matches the whole
275 page, from the start of the first <script> tag.
278 That's more than we want, but the pattern continues: <tt class=
279 "LITERAL">document\.referrer</tt> matches only the exact string
280 <span class="QUOTE">"document.referrer"</span>. The dot needed to
281 be <span class="emphasis"><i class="EMPHASIS">escaped</i></span>,
282 i.e. preceded by a backslash, to take away its special meaning as a
283 joker, and make it just a regular dot. So far, the meaning is:
284 Match from the start of the first <script> tag in a the page,
285 up to, and including, the text <span class=
286 "QUOTE">"document.referrer"</span>, if <span class="emphasis"><i
287 class="EMPHASIS">both</i></span> are present in the page (and
288 appear in that order).
291 But there's still more pattern to go. The next element, again
292 enclosed in parentheses, is <tt class=
293 "LITERAL">.*</script></tt>. You already know what <tt class=
294 "LITERAL">.*</tt> means, so the whole pattern translates to: Match
295 from the start of the first <script> tag in a page to the end
296 of the last <script> tag, provided that the text <span class=
297 "QUOTE">"document.referrer"</span> appears somewhere in between.
300 This is still not the whole story, since we have ignored the
301 options and the parentheses: The portions of the page matched by
302 sub-patterns that are enclosed in parentheses, will be remembered
303 and be available through the variables <tt class="LITERAL">$1, $2,
304 ...</tt> in the substitute. The <tt class="LITERAL">U</tt> option
305 switches to ungreedy matching, which means that the first <tt
306 class="LITERAL">.*</tt> in the pattern will only <span class=
307 "QUOTE">"eat up"</span> all text in between <span class=
308 "QUOTE">"<script"</span> and the <span class="emphasis"><i
309 class="EMPHASIS">first</i></span> occurrence of <span class=
310 "QUOTE">"document.referrer"</span>, and that the second <tt class=
311 "LITERAL">.*</tt> will only span the text up to the <span class=
312 "emphasis"><i class="EMPHASIS">first</i></span> <span class=
313 "QUOTE">"</script>"</span> tag. Furthermore, the <tt class=
314 "LITERAL">s</tt> option says that the match may span multiple lines
315 in the page, and the <tt class="LITERAL">g</tt> option again means
316 that the substitution is global.
319 So, to summarize, the pattern means: Match all scripts that contain
320 the text <span class="QUOTE">"document.referrer"</span>. Remember
321 the parts of the script from (and including) the start tag up to
322 (and excluding) the string <span class=
323 "QUOTE">"document.referrer"</span> as <tt class="LITERAL">$1</tt>,
324 and the part following that string, up to and including the closing
325 tag, as <tt class="LITERAL">$2</tt>.
328 Now the pattern is deciphered, but wasn't this about substituting
329 things? So lets look at the substitute: <tt class="LITERAL">$1"Not
330 Your Business!"$2</tt> is easy to read: The text remembered as <tt
331 class="LITERAL">$1</tt>, followed by <tt class="LITERAL">"Not Your
332 Business!"</tt> (<span class="emphasis"><i class=
333 "EMPHASIS">including</i></span> the quotation marks!), followed by
334 the text remembered as <tt class="LITERAL">$2</tt>. This produces
335 an exact copy of the original string, with the middle part (the
336 <span class="QUOTE">"document.referrer"</span>) replaced by <tt
337 class="LITERAL">"Not Your Business!"</tt>.
340 The whole job now reads: Replace <span class=
341 "QUOTE">"document.referrer"</span> by <tt class="LITERAL">"Not Your
342 Business!"</tt> wherever it appears inside a <script> tag.
343 Note that this job won't break JavaScript syntax, since both the
344 original and the replacement are syntactically valid string
345 objects. The script just won't have access to the referrer
349 We'll show you two other jobs from the JavaScript taming
350 department, but this time only point out the constructs of special
355 <table border="0" bgcolor="#E0E0E0" width="100%">
359 # The status bar is for displaying link targets, not pointless blahblah
361 s/window\.status\s*=\s*(['"]).*?\1/dUmMy=1/ig
368 <tt class="LITERAL">\s</tt> stands for whitespace characters
369 (space, tab, newline, carriage return, form feed), so that <tt
370 class="LITERAL">\s*</tt> means: <span class="QUOTE">"zero or more
371 whitespace"</span>. The <tt class="LITERAL">?</tt> in <tt class=
372 "LITERAL">.*?</tt> makes this matching of arbitrary text ungreedy.
373 (Note that the <tt class="LITERAL">U</tt> option is not set). The
374 <tt class="LITERAL">['"]</tt> construct means: <span class=
375 "QUOTE">"a single <span class="emphasis"><i class=
376 "EMPHASIS">or</i></span> a double quote"</span>. Finally, <tt
377 class="LITERAL">\1</tt> is a back-reference to the first
378 parenthesis just like <tt class="LITERAL">$1</tt> above, with the
379 difference that in the <span class="emphasis"><i class=
380 "EMPHASIS">pattern</i></span>, a backslash indicates a
381 back-reference, whereas in the <span class="emphasis"><i class=
382 "EMPHASIS">substitute</i></span>, it's the dollar.
385 So what does this job do? It replaces assignments of single- or
386 double-quoted strings to the <span class=
387 "QUOTE">"window.status"</span> object with a dummy assignment
388 (using a variable name that is hopefully odd enough not to conflict
389 with real variables in scripts). Thus, it catches many cases where
390 e.g. pointless descriptions are displayed in the status bar instead
391 of the link target when you move your mouse over links.
395 <table border="0" bgcolor="#E0E0E0" width="100%">
399 # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
401 s/(<body [^>]*)onunload(.*>)/$1never$2/iU
408 Including the <a href=
409 "http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-eventgroupings-htmlevents"
410 target="_top">OnUnload event binding</a> in the HTML DOM was a
411 <span class="emphasis"><i class="EMPHASIS">CRIME</i></span>. When I
412 close a browser window, I want it to close and die. Basta. This job
413 replaces the <span class="QUOTE">"onunload"</span> attribute in
414 <span class="QUOTE">"<body>"</span> tags with the dummy word
415 <tt class="LITERAL">never</tt>. Note that the <tt class=
416 "LITERAL">i</tt> option makes the pattern matching
417 case-insensitive. Also note that ungreedy matching alone doesn't
418 always guarantee a minimal match: In the first parenthesis, we had
419 to use <tt class="LITERAL">[^>]*</tt> instead of <tt class=
420 "LITERAL">.*</tt> to prevent the match from exceeding the
421 <body> tag if it doesn't contain <span class=
422 "QUOTE">"OnUnload"</span>, but the page's content does.
425 The last example is from the fun department:
429 <table border="0" bgcolor="#E0E0E0" width="100%">
433 FILTER: fun Fun text replacements
435 # Spice the daily news:
437 s/microsoft(?!\.com)/MicroSuck/ig
444 Note the <tt class="LITERAL">(?!\.com)</tt> part (a so-called
445 negative lookahead) in the job's pattern, which means: Don't match,
446 if the string <span class="QUOTE">".com"</span> appears directly
447 following <span class="QUOTE">"microsoft"</span> in the page. This
448 prevents links to microsoft.com from being trashed, while still
449 replacing the word everywhere else.
453 <table border="0" bgcolor="#E0E0E0" width="100%">
457 # Buzzword Bingo (example for extended regex syntax)
459 s* industry[ -]leading \
461 | customer[ -]focused \
463 | award[ -]winning # Comments are OK, too! \
464 | high[ -]performance \
465 | solutions[ -]based \
469 *<font color="red"><b>BINGO!</b></font> \
477 The <tt class="LITERAL">x</tt> option in this job turns on extended
478 syntax, and allows for e.g. the liberal use of (non-interpreted!)
479 whitespace for nicer formatting.
487 <a name="PREDEFINED-FILTERS">9.2. The Pre-defined Filters</a>
490 The distribution <tt class="FILENAME">default.filter</tt> file
491 contains a selection of pre-defined filters for your convenience:
493 <div class="VARIABLELIST">
496 <span class="emphasis"><i class=
497 "EMPHASIS">js-annoyances</i></span>
501 The purpose of this filter is to get rid of particularly
502 annoying JavaScript abuse. To that end, it
507 replaces JavaScript references to the browser's referrer
508 information with the string "Not Your Business!". This
509 compliments the <tt class="LITERAL"><a href=
510 "actions-file.html#HIDE-REFERRER">hide-referrer</a></tt>
511 action on the content level.
516 removes the bindings to the DOM's <a href=
517 "http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-eventgroupings-htmlevents"
518 target="_top">unload event</a> which we feel has no
519 right to exist and is responsible for most <span class=
520 "QUOTE">"exit consoles"</span>, i.e. nasty windows that
521 pop up when you close another one.
526 removes code that causes new windows to be opened with
527 undesired properties, such as being full-screen,
528 non-resizeable, without location, status or menu bar etc.
534 Use with caution. This is an aggressive filter, and can break
535 sites that rely heavily on JavaScript.
539 <span class="emphasis"><i class="EMPHASIS">js-events</i></span>
543 This is a very radical measure. It removes virtually all
544 JavaScript event bindings, which means that scripts can not
545 react to user actions such as mouse movements or clicks,
546 window resizing etc, anymore. Use with caution!
549 We <span class="emphasis"><i class="EMPHASIS">strongly
550 discourage</i></span> using this filter as a default since it
551 breaks many legitimate scripts. It is meant for use only on
552 extra-nasty sites (should you really need to go there).
556 <span class="emphasis"><i class=
557 "EMPHASIS">html-annoyances</i></span>
561 This filter will undo many common instances of HTML based
565 The <tt class="LITERAL">BLINK</tt> and <tt class=
566 "LITERAL">MARQUEE</tt> tags are neutralized (yeah baby!), and
567 browser windows will be created as resizeable (as of course
568 they should be!), and will have location, scroll and menu
569 bars -- even if specified otherwise.
573 <span class="emphasis"><i class=
574 "EMPHASIS">content-cookies</i></span>
578 Most cookies are set in the HTTP dialog, where they can be
579 intercepted by the <tt class="LITERAL"><a href=
580 "actions-file.html#CRUNCH-INCOMING-COOKIES">crunch-incoming-cookies</a></tt>
581 and <tt class="LITERAL"><a href=
582 "actions-file.html#CRUNCH-OUTGOING-COOKIES">crunch-outgoing-cookies</a></tt>
583 actions. But web sites increasingly make use of HTML meta
584 tags and JavaScript to sneak cookies to the browser on the
588 This filter disables most HTML and JavaScript code that reads
589 or sets cookies. It cannot detect all clever uses of these
590 types of code, so it should not be relied on as an absolute
591 fix. Use it wherever you would also use the cookie crunch
596 <span class="emphasis"><i class="EMPHASIS">refresh
601 Disable any refresh tags if the interval is greater than nine
602 seconds (so that redirections done via refresh tags are not
603 destroyed). This is useful for dial-on-demand setups, or for
604 those who find this HTML feature annoying.
608 <span class="emphasis"><i class=
609 "EMPHASIS">unsolicited-popups</i></span>
613 This filter attempts to prevent only <span class=
614 "QUOTE">"unsolicited"</span> pop-up windows from opening, yet
615 still allow pop-up windows that the user has explicitly
616 chosen to open. It was added in version 3.0.1, as an
617 improvement over earlier such filters.
620 Technical note: The filter works by redefining the
621 window.open JavaScript function to a dummy function, <tt
622 class="LITERAL">PrivoxyWindowOpen()</tt>, during the loading
623 and rendering phase of each HTML page access, and restoring
624 the function afterward.
627 This is recommended only for browsers that cannot perform
628 this function reliably themselves. And be aware that some
629 sites require such windows in order to function normally. Use
634 <span class="emphasis"><i class=
635 "EMPHASIS">all-popups</i></span>
639 Attempt to prevent <span class="emphasis"><i class=
640 "EMPHASIS">all</i></span> pop-up windows from opening. Note
641 this should be used with even more discretion than the above,
642 since it is more likely to break some sites that require
643 pop-ups for normal usage. Use with caution.
647 <span class="emphasis"><i class=
648 "EMPHASIS">img-reorder</i></span>
652 This is a helper filter that has no value if used alone. It
653 makes the <tt class="LITERAL">banners-by-size</tt> and <tt
654 class="LITERAL">banners-by-link</tt> (see below) filters more
655 effective and should be enabled together with them.
659 <span class="emphasis"><i class=
660 "EMPHASIS">banners-by-size</i></span>
664 This filter removes image tags purely based on what size they
665 are. Fortunately for us, many ads and banner images tend to
666 conform to certain standardized sizes, which makes this
667 filter quite effective for ad stripping purposes.
670 Occasionally this filter will cause false positives on images
671 that are not ads, but just happen to be of one of the
672 standard banner sizes.
675 Recommended only for those who require extreme ad blocking.
676 The default block rules should catch 95+% of all ads <span
677 class="emphasis"><i class="EMPHASIS">without</i></span> this
682 <span class="emphasis"><i class=
683 "EMPHASIS">banners-by-link</i></span>
687 This is an experimental filter that attempts to kill any
688 banners if their URLs seem to point to known or suspected
689 click trackers. It is currently not of much value and is not
690 recommended for use by default.
694 <span class="emphasis"><i class="EMPHASIS">webbugs</i></span>
698 Webbugs are small, invisible images (technically 1X1 GIF
699 images), that are used to track users across websites, and
700 collect information on them. As an HTML page is loaded by the
701 browser, an embedded image tag causes the browser to contact
702 a third-party site, disclosing the tracking information
703 through the requested URL and/or cookies for that third-party
704 domain, without the user ever becoming aware of the
705 interaction with the third-party site. HTML-ized spam also
706 uses a similar technique to verify email addresses.
709 This filter removes the HTML code that loads such <span
710 class="QUOTE">"webbugs"</span>.
714 <span class="emphasis"><i class=
715 "EMPHASIS">tiny-textforms</i></span>
719 A rather special-purpose filter that can be used to enlarge
720 textareas (those multi-line text boxes in web forms) and turn
721 off hard word wrap in them. It was written for the
722 sourceforge.net tracker system where such boxes are a
723 nuisance, but it can be handy on other sites, too.
726 It is not recommended to use this filter as a default.
730 <span class="emphasis"><i class=
731 "EMPHASIS">jumping-windows</i></span>
735 Many consider windows that move, or resize themselves to be
736 abusive. This filter neutralizes the related JavaScript code.
737 Note that some sites might not display or behave as intended
738 when using this filter. Use with caution.
742 <span class="emphasis"><i class=
743 "EMPHASIS">frameset-borders</i></span>
747 Some web designers seem to assume that everyone in the world
748 will view their web sites using the same browser brand and
749 version, screen resolution etc, because only that assumption
750 could explain why they'd use static frame sizes, yet prevent
751 their frames from being resized by the user, should they be
752 too small to show their whole content.
755 This filter removes the related HTML code. It should only be
756 applied to sites which need it.
760 <span class="emphasis"><i class=
761 "EMPHASIS">demoronizer</i></span>
765 Many Microsoft products that generate HTML use non-standard
766 extensions (read: violations) of the ISO 8859-1 aka Latin-1
767 character set. This can cause those HTML documents to display
768 with errors on standard-compliant platforms.
771 This filter translates the MS-only characters into Latin-1
772 equivalents. It is not necessary when using MS products, and
773 will cause corruption of all documents that use 8-bit
774 character sets other than Latin-1. It's mostly worthwhile for
775 Europeans on non-MS platforms, if weird garbage characters
776 sometimes appear on some pages, or user agents that don't
777 correct for this on the fly.
781 <span class="emphasis"><i class=
782 "EMPHASIS">shockwave-flash</i></span>
786 A filter for shockwave haters. As the name suggests, this
787 filter strips code out of web pages that is used to embed
788 shockwave flash objects.
794 <span class="emphasis"><i class=
795 "EMPHASIS">quicktime-kioskmode</i></span>
799 Change HTML code that embeds Quicktime objects so that
800 kioskmode, which prevents saving, is disabled.
804 <span class="emphasis"><i class="EMPHASIS">fun</i></span>
808 Text replacements for subversive browsing fun. Make fun of
809 your favorite Monopolist or play buzzword bingo.
813 <span class="emphasis"><i class=
814 "EMPHASIS">crude-parental</i></span>
818 A demonstration-only filter that shows how <span class=
819 "APPLICATION">Privoxy</span> can be used to delete web
820 content on a keyword basis.
824 <span class="emphasis"><i class=
825 "EMPHASIS">ie-exploits</i></span>
829 An experimental collection of text replacements to disable
830 malicious HTML and JavaScript code that exploits known
831 security holes in Internet Explorer.
834 Presently, it only protects against Nimda and a cross-site
835 scripting bug, and would need active maintenance to provide
836 more substantial protection.
840 <span class="emphasis"><i class=
841 "EMPHASIS">site-specifics</i></span>
845 Some web sites have very specific problems, the cure for
846 which doesn't apply anywhere else, or could even cause damage
850 This is a collection of such site-specific cures which should
851 only be applied to the sites they were intended for, which is
852 what the supplied <tt class="FILENAME">default.action</tt>
853 file does. Users shouldn't need to change anything regarding
858 <span class="emphasis"><i class="EMPHASIS">google</i></span>
862 A CSS based block for Google text ads. Also removes a width
863 limitation and the toolbar advertisement.
867 <span class="emphasis"><i class="EMPHASIS">yahoo</i></span>
871 Another CSS based block, this time for Yahoo text ads. And
872 removes a width limitation as well.
876 <span class="emphasis"><i class="EMPHASIS">msn</i></span>
880 Another CSS based block, this time for MSN text ads. And
881 removes tracking URLs, as well as a width limitation.
885 <span class="emphasis"><i class="EMPHASIS">blogspot</i></span>
889 Cleans up some Blogspot blogs. Read the fine print before
893 This filter also intentionally removes some navigation stuff
894 and sets the page width to 100%. As a result, some rounded
895 <span class="QUOTE">"corners"</span> would appear to early or
896 not at all and as fixing this would require a browser that
897 understands background-size (CSS3), they are removed instead.
901 <span class="emphasis"><i class=
902 "EMPHASIS">xml-to-html</i></span>
906 Server-header filter to change the Content-Type from xml to
911 <span class="emphasis"><i class=
912 "EMPHASIS">html-to-xml</i></span>
916 Server-header filter to change the Content-Type from html to
921 <span class="emphasis"><i class="EMPHASIS">no-ping</i></span>
925 Removes the non-standard <tt class="LITERAL">ping</tt>
926 attribute from anchor and area HTML tags.
930 <span class="emphasis"><i class=
931 "EMPHASIS">hide-tor-exit-notation</i></span>
935 Client-header filter to remove the <b class="COMMAND">Tor</b>
936 exit node notation found in Host and Referer headers.
939 If <span class="APPLICATION">Privoxy</span> and <b class=
940 "COMMAND">Tor</b> are chained and <span class=
941 "APPLICATION">Privoxy</span> is configured to use socks4a,
942 one can use <span class=
943 "QUOTE">"http://www.example.org.foobar.exit/"</span> to
944 access the host <span class="QUOTE">"www.example.org"</span>
945 through the <b class="COMMAND">Tor</b> exit node <span class=
946 "QUOTE">"foobar"</span>.
949 As the HTTP client isn't aware of this notation, it treats
950 the whole string <span class=
951 "QUOTE">"www.example.org.foobar.exit"</span> as host and uses
952 it for the <span class="QUOTE">"Host"</span> and <span class=
953 "QUOTE">"Referer"</span> headers. From the server's point of
954 view the resulting headers are invalid and can cause
958 An invalid <span class="QUOTE">"Referer"</span> header can
959 trigger <span class="QUOTE">"hot-linking"</span> protections,
960 an invalid <span class="QUOTE">"Host"</span> header will make
961 it impossible for the server to find the right vhost (several
962 domains hosted on the same IP address).
965 This client-header filter removes the <span class=
966 "QUOTE">"foo.exit"</span> part in those headers to prevent
967 the mentioned problems. Note that it only modifies the HTTP
968 headers, it doesn't make it impossible for the server to
969 detect your <b class="COMMAND">Tor</b> exit node based on the
970 IP address the request is coming from.
977 <div class="NAVFOOTER">
978 <hr width="100%" class="c1">
979 <table summary="Footer navigation table" width="100%" border="0"
980 cellpadding="0" cellspacing="0">
982 <td width="33%" align="left" valign="top">
983 <a href="actions-file.html" accesskey="P">Prev</a>
985 <td width="34%" align="center" valign="top">
986 <a href="index.html" accesskey="H">Home</a>
988 <td width="33%" align="right" valign="top">
989 <a href="templates.html" accesskey="N">Next</a>
993 <td width="33%" align="left" valign="top">
996 <td width="34%" align="center" valign="top">
999 <td width="33%" align="right" valign="top">
1000 Privoxy's Template Files