X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=default.filter;h=df79e5e923a9d11ac1bda4766a6734dbe8df2527;hb=31486ed53c250e6f67ee06b00063125d47d46311;hp=0bbb317b2a3fe2c537713994c1254daa2b9244b4;hpb=e7da099f0706fcd73af9e20fbf23882cd959c894;p=privoxy.git diff --git a/default.filter b/default.filter index 0bbb317b..df79e5e9 100644 --- a/default.filter +++ b/default.filter @@ -2,7 +2,7 @@ # # File : $Source: /cvsroot/ijbswa/current/default.filter,v $ # -# $Id: default.filter,v 1.29 2006/10/11 14:03:17 fabiankeil Exp $ +# $Id: default.filter,v 1.34 2006/12/12 17:32:23 fabiankeil Exp $ # # Purpose : Rules to process the content of web pages # @@ -83,6 +83,7 @@ s|(?:\w+\.)+referrer|"Not Your Business!"|gisU # The status bar is for displaying link targets, not pointless blahblah # s/(\W\s*)((this|window)\.(default)?status)\s*=\s*((['"]).*?(? tags to make the banners-by-* filters more effective # ################################################################################# -FILTER: img-reorder Reorder attributes in <img> tags to make the banners-by-* filters more effective +FILTER: img-reorder Reorder attributes in tags to make the banners-by-* filters more effective # In the first step src is moved to the start, then width is moved to the second # place to guarantee an order of src, width, height. @@ -282,8 +283,7 @@ s@\1\s]*?(?:adclick|atwola\.com/(?:link|redir)|double ################################################################################# FILTER: webbugs Squish WebBugs (1x1 invisible GIFs used for user tracking) -s@]*\s(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*\s(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*?>@@siUg +s@]*\s(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*\s(?:width|height)\s*=\s*['"]?[01](?=\D)[^>]*?>@@siUg ################################################################################# @@ -304,8 +304,7 @@ s/(]*?)wrap=(['"]?)hard\2/$1/ig ################################################################################# FILTER: jumping-windows Prevent windows from resizing and moving themselves -s/(?:window|this|self)\.(?:move|resize)(?:to|by)\(/''.concat(/ig - +s/(?<=[\W])(?:window|this|self)\.(?:move|resize)(?:to|by)\(/''.concat(/ig ################################################################################# # @@ -391,7 +390,7 @@ FILTER: fun Text replacements for subversive browsing fun! # SCNR # -s/microsoft(?!.com)/MicroSuck/ig +s/microsoft(?!.[^\s])/MicroSuck/ig # Buzzword Bingo (example for extended regex syntax) # @@ -497,6 +496,15 @@ s|(]*)onload|$1never|sig s|( and tags. +# +################################################################################# +FILTER: no-ping Removes non-standard ping attributes in and tags. +s@(]*?)\sping=(['"]?)([^"'>]+)\2([>\s]?)@\ +PING!\n$1$4@ig + ################################################################################# # # google: CSS-based block for Google text ads. Also removes @@ -508,7 +516,7 @@ s@@\n$0@ s@
@
@ s@(@\n$0@ + \#symadbn, \#ymadbn, .yschbox, \#yschsec, .yschhd, \#yschanswr, .yschftad,\ + .yschspn, .yschspns, \#ygrp-sponsored-links {display: none !important;}\n\ + \#yschpri, \#yschweb {width: 100% !important; max-width: 100% !important;}\n\ + \#yschqcon, \#yschtg {width: auto !important; /* No useless horizontal scrollbar please */}\n\ +\n$0@ ################################################################################# # @@ -540,9 +550,19 @@ FILTER: msn CSS-based block for MSN text ads. Also removes tracking URLs and a w s@@\n$0@ + \#results, .flank, .results_area_flank, .results_area_stroke, .SearchSection .not\ + {width: 99% /*!important*/; min-width: 99% !important;\ + max-width: 100% !important; /* width:100% sometimes causes horizontal scrollbars */}\n\ + /* Make continue links harder to miss */\n\ + \#pagination_bottom a {padding: .3em .5em .3em .5em; border: 1px solid \#e6e6e6;}\n\ + \#pagination_bottom li, \#pagination_bottom li .selected, li .nextPage \ + {margin: 0 !important; cursor: auto; border: none; padding:.1em;}\n\ + \#pagination_bottom li .prevPage {padding-right: 1.5em !important;}\n\ + \#pagination_bottom li .selected {border: none;}\n\ + .selected a {background-color: \#d2eaf6; border: 1px solid \#b7d8ee;}\n\ + /* Remove "suggestions". They are next to worthless but partly overlap with the search results */\n\ + .suggestion, \#nys_right {clear: both; display:none;}\n\ + \n$0@ s@(]*) id=(["']?)ads_[^\2]*\2@$1 class="msn_ads"@Uig s@(]*href=\")http://g.msn.com/.*\?(http://.*)(&&DI=.*)(\")@$1$2$4@Ug s@(]*)gping=\".*\"@$1 title="URL cleaned up by Privoxy's msn filter"@Ug @@ -602,10 +622,75 @@ s@^(Content-Type:) text/html(;.*)?$@$1 application/xhtml+xml$2@ FILTER: xml-to-html Header filter to change the Content-Type from xml to html. s@^(Content-Type:) (?:application|text)/(?:xhtml\+)?xml(;.*)?$@$1 text/html$2@ +################################################################################# +# +# hide-tor-exit-notation: Header filter to remove the Tor exit node notation +# in Host and Referer headers. +# +# Note: If Privoxy and Tor are chained and Privoxy is configured to +# use socks4a, one can use http://www.example.org.foobar.exit/ +# to access the host www.example.org through Tor exit node foobar. +# +# As the HTTP client isn't aware of this notation, it treats the +# whole string "www.example.org.foobar.exit" as host and uses it +# for the "Host" and "Referer" headers. From the server's point of +# view the resulting headers are invalid and can cause problems. +# +# An invalid "Referer" header can trigger "hot-linking" protections, +# an invalid "Host" header will make it impossible for the server to +# find the right vhost (several domains hosted on the same IP address). +# +# This filter removes the "foo.exit" part in those headers +# to prevent the mentioned problems. Note that it only modifies +# the HTTP headers, it doesn't make it impossible for the server +# to detect your Tor exit node based on the IP address the request is +# coming from. +# +################################################################################# +FILTER: hide-tor-exit-notation Header filter to remove the Tor exit node notation in Host and Referer headers. +s@^((?:Referer|Host):\s*(?:https?://)?[^/]*)\.[^\./]*?\.exit@$1@i + + ############################################################################## # # Revisions : # $Log: default.filter,v $ +# Revision 1.34 2006/12/12 17:32:23 fabiankeil +# Added id mbEnd to google filter, it's now and then +# used for the sponsored links. +# +# Have js-annoyances try to prevent status bar +# modifications where the status bar text is +# inside another variable. Fixes 1605710. +# +# Revision 1.33 2006/11/16 17:10:43 fabiankeil +# Removed webbugs debugging comment again. +# The apostrophe could break JavaScript and +# the comment itself could mess up existing +# comments. +# +# Revision 1.32 2006/11/10 18:04:04 fabiankeil +# Have no-ping print the ping warning in red. +# +# Modified yahoo to keep in sync with recent +# CSS changes and to suppress a useless horizontal +# scrollbar. +# +# msn now makes sure that the continue-link boxes +# act as links (the original CSS just changes the cursor). +# +# Changed fun filter regex to leave microsoft links alone. +# Fixes BR 1019996. +# +# Revision 1.31 2006/10/21 13:12:28 fabiankeil +# Added no-ping and hide-tor-exit-notation. +# +# Adjusted jumping-windows to break less. +# Fixes BR 1146134. +# +# Revision 1.30 2006/10/18 12:36:50 fabiankeil +# google filter now cleans Google groups as well. +# # Revision 1.29 2006/10/11 14:03:17 fabiankeil # Changed img-reorder regex to only move width # attributes if they are following at least one