Move all doc build stuff to doc/source/GNUmakefile, leaving a 'make dok'
[privoxy.git] / default.filter
index 16dfa58..485033a 100644 (file)
@@ -2,17 +2,13 @@
 # 
 #  File        :  $Source: /cvsroot/ijbswa/current/default.filter,v $
 # 
 # 
 #  File        :  $Source: /cvsroot/ijbswa/current/default.filter,v $
 # 
-#  $Id: default.filter,v 1.5 2002/03/27 15:30:26 swa Exp $
+#  $Id: default.filter,v 1.10 2002/04/18 10:14:19 oes Exp $
 #
 #  Purpose     :  Rules to process the content of web pages
 # 
 #  Copyright   :  Written by and Copyright
 #                 Privoxy team. http://www.privoxy.org/
 #
 #
 #  Purpose     :  Rules to process the content of web pages
 # 
 #  Copyright   :  Written by and Copyright
 #                 Privoxy team. http://www.privoxy.org/
 #
-#                 Based on the Internet Junkbuster originally written
-#                 by and Copyright (C) 1997 Anonymous Coders and
-#                 Junkbusters Corporation.  http://www.junkbusters.com
-#
 # We value your feedback. However, to provide you with the best support,
 # please note:
 #  
 # We value your feedback. However, to provide you with the best support,
 # please note:
 #  
@@ -74,21 +70,16 @@ FILTER: html-annoyances Get rid of particularly annoying HTML abuse
 # New browser windows (if allowed -- see no-popups filter below) should be
 # resizeable and have a location and status bar
 #
 # New browser windows (if allowed -- see no-popups filter below) should be
 # resizeable and have a location and status bar
 #
-s/(<a\s+href[^>]+)resizable=['"]?(no|0|false)['"]?(.*>)/$1resizable=1$3/igU 
-s/(<a\s+href[^>]+)location=['"]?(no|0)['"]?(.*>)/$1location=1$3/igU 
-s/(<a\s+href[^>]+)status=['"]?(no|0)['"]?(.*>)/$1status=1$3/igU
-s/(<a\s+href[^>]+)scrolling=['"]?(no|0|auto)['"]?(.*>)/$1scrolling=no$3/igU
-s/(<a\s+href[^>]+)menubar=['"]?(no|0)['"]?(.*>)/$1menubar=1$3/igU
+s/(<a\s+href[^>]+)resizable=['"]?(no|0|false)['"]?(.*>)/$1resizable="1"$3/igU 
+s/(<a\s+href[^>]+)location=['"]?(no|0)['"]?(.*>)/$1location="1"$3/igU 
+s/(<a\s+href[^>]+)status=['"]?(no|0)['"]?(.*>)/$1status="1"$3/igU
+s/(<a\s+href[^>]+)scrolling=['"]?(no|0|auto)['"]?(.*>)/$1scrolling="no"$3/igU
+s/(<a\s+href[^>]+)menubar=['"]?(no|0)['"]?(.*>)/$1menubar="1"$3/igU
 
 # The <BLINK> tag was a crime!
 #
 s*<blink>|</blink>**ig
 
 
 # The <BLINK> tag was a crime!
 #
 s*<blink>|</blink>**ig
 
-# Is this evil? 
-#
-#s/margin(height|width)=[0-9]*//gi
-#s/noresize/yesresize/igU
-
 
 #################################################################################
 #
 
 #################################################################################
 #
@@ -103,7 +94,7 @@ s|(<script.*)document\.referrer(.*</script>)|$1"Not Your Business!"$2|Usg
 
 # The status bar is for displaying link targets, not pointless blahblah
 #
 
 # The status bar is for displaying link targets, not pointless blahblah
 #
-s/status='.*?';*//ig
+s/window.status\s*=\s*['"].*?['"]/dUmMy=1/ig
 
 # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
 #
 
 # Kill OnUnload popups. Yummy. Test: http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
 #
@@ -128,26 +119,30 @@ s|<meta\s+http-equiv=['"]?set-cookie['"]?\s+content=[^>].*>|<!--no cookies here
 
 ##################################################################################
 #
 
 ##################################################################################
 #
-# no-popups: Kill all popups in JS and HTML
+# popups: Kill all popups in JS and HTML
 #
 #################################################################################
 #
 #################################################################################
-FILTER: no-popups Kill all popups in JS and HTML
+FILTER: popups Kill all popups in JS and HTML
+
+s/window\.open\s*\(/concat(/ig               # JavaScript
+s/([ =;])open\s*\(/$1concat(/ig              # JavaScript alternative
+s/target=['"]?(_blank|_new)['"]?/notarget/ig # HTML
 
 
-s/window\.open\(/1;''\.concat\(/ig           # JavaScript
-s/target=['"]?_blank['"]?/target_crunched/ig # HTML
-s/target=['"]?_new['"]?/target_crunched/ig   # HTML
 
 #################################################################################
 #
 
 #################################################################################
 #
-# frameset-borders: Give frames a border and make them resizable
+# frameset-borders: Give frames a border, make them resizable and scrollable
 #
 #################################################################################
 FILTER: frameset-borders Give frames a border and make them resizable
 
 s/(<frameset [^>]+)framespacing=['"]?(no|0)['"]?(.*>)/$1$3/igU
 #
 #################################################################################
 FILTER: frameset-borders Give frames a border and make them resizable
 
 s/(<frameset [^>]+)framespacing=['"]?(no|0)['"]?(.*>)/$1$3/igU
-s/(<frameset [^>]+)frameborder=['"]?(no|0)['"]?(.*>)/$1$3/igU
-s/(<frame [^>]+)border=['"]?(no|0)['"]?(.*>)/$1$3/igU
-s/(<frame [^>]+)resizable=['"]?(no|0|false)['"]?(.*>)/$1$3/igU 
+s/(<frameset [^>]+)(frame)?border=['"]?(no|0)['"]?(.*>)/$1$4/igU
+
+s/(<frame [^>]+)frameborder=['"]?(no|0)['"]?(.*>)/$1$3/igU
+s/(<frame [^>]+)noresize(.*>)/$1$2/igU
+s/(<frame [^>]+)resizable=['"]?(no)['"]?(.*>)/$1$3/igU 
+s/(<frame [^>]+)scrolling=['"]?(no)['"]?(.*>)/$1$3/igU
 
 #################################################################################
 #
 
 #################################################################################
 #
@@ -156,15 +151,15 @@ s/(<frame [^>]+)resizable=['"]?(no|0|false)['"]?(.*>)/$1$3/igU
 #################################################################################
 FILTER: webbugs Squish WebBugs (1x1 invisible GIFs used for user tracking)
 
 #################################################################################
 FILTER: webbugs Squish WebBugs (1x1 invisible GIFs used for user tracking)
 
-s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/sig
+s/<img\s+[^>]*?(width|height)\s*=\s*['"]?1\D[^>]*?(width|height)\s*=\s*['"]?1(\D[^>]*?)?>/<!-- Squished WebBug -->/siUg
 
 
 #################################################################################
 #
 
 
 #################################################################################
 #
-# no-refresh: Kill automatic refresh tags (for dial-on-demand setups)
+# refresh-tags: Kill automatic refresh tags (for dial-on-demand setups)
 #
 #################################################################################
 #
 #################################################################################
-FILTER: no-refresh Kill automatic refresh tags (for dial-on-demand setups)
+FILTER: refresh-tags Kill automatic refresh tags (for dial-on-demand setups)
 
 s/<meta\s+http-equiv=['"]?refresh['"]?\s+content=['"]?[0-9]*;\s+url=([^>]*)['"]?>/<link rev="x-refresh" href=$1>/iU   
 s/<meta\s+http-equiv=['"]?page-enter['"]?\s+content=[^>].*>/<!--no page enter for me-->/iU 
 
 s/<meta\s+http-equiv=['"]?refresh['"]?\s+content=['"]?[0-9]*;\s+url=([^>]*)['"]?>/<link rev="x-refresh" href=$1>/iU   
 s/<meta\s+http-equiv=['"]?page-enter['"]?\s+content=[^>].*>/<!--no page enter for me-->/iU 
@@ -179,7 +174,7 @@ FILTER: fun Text replacements for subversive browsing fun!
 
 s/microsoft(?!.com)/MicroSuck/ig
 
 
 s/microsoft(?!.com)/MicroSuck/ig
 
-# Buzzword Bingo (example for extended syntax)
+# Buzzword Bingo (example for extended regex syntax)
 #
 s* industry[ -]leading \
 |  cutting[ -]edge \
 #
 s* industry[ -]leading \
 |  cutting[ -]edge \
@@ -189,7 +184,7 @@ s* industry[ -]leading \
 |  unmatched \
 |  unparalleled \
 |  unrivalled \
 |  unmatched \
 |  unparalleled \
 |  unrivalled \
-*<font color=red><b>BINGO!</b></font> \
+*<font color="red"><b>BINGO!</b></font> \
 *igx
 
 
 *igx
 
 
@@ -200,8 +195,7 @@ s* industry[ -]leading \
 #################################################################################
 FILTER: nimda Remove Nimda (virus) code
 
 #################################################################################
 FILTER: nimda Remove Nimda (virus) code
 
-s%<script language="JavaScript">(window\.open|1;''\.concat)\("readme\.eml", null, "resizable=no,top=6000,left=6000"\)</script>%<br><hr><font size=7><b>Internet J</b></font><b><font size=6>UNK</font><font size=5 color="red"><i>BUSTER</i></font></b><font size=7> WARNING: This Server is infected with <a href="http://www.cert.org/advisories/CA-2001-26.html">Nimda</a>!</font>%g
-
+s%<script language="JavaScript">(window\.open|1;''\.concat)\("readme\.eml", null, "resizable=no,top=6000,left=6000"\)</script>%<br><font size="7"> WARNING: This Server is infected with <a href="http://www.cert.org/advisories/CA-2001-26.html">Nimda</a>!</font>%g
 
 #################################################################################
 #
 
 #################################################################################
 #
@@ -218,24 +212,34 @@ s%<script language="JavaScript">(window\.open|1;''\.concat)\("readme\.eml", null
 #################################################################################
 FILTER: banners-by-size Kill banners by size
 
 #################################################################################
 FILTER: banners-by-size Kill banners by size
 
-s|<img\s+[^>]*?(width=['"]?468\D)[^>]*(height=['"]?60[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?234\D)[^>]*(height=['"]?60[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?88\D)[^>]*(height=['"]?31[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?90[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?600[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?60[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?160\D)[^>]*(height=['"]?600[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?125\D)[^>]*(height=['"]?125[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?240[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?180\D)[^>]*(height=['"]?150[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?300\D)[^>]*(height=['"]?250[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?250\D)[^>]*(height=['"]?250[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?240\D)[^>]*(height=['"]?400[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
-s|<img\s+[^>]*?(width=['"]?336\D)[^>]*(height=['"]?280[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?468\D)[^>]*(height=['"]?60[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?234\D)[^>]*(height=['"]?60[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?88\D)[^>]*(height=['"]?31[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?90[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?600[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?60[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?160\D)[^>]*(height=['"]?600[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?125\D)[^>]*(height=['"]?125[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?120\D)[^>]*(height=['"]?240[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?180\D)[^>]*(height=['"]?150[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?300\D)[^>]*(height=['"]?250[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?250\D)[^>]*(height=['"]?250[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?240\D)[^>]*(height=['"]?400[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?336\D)[^>]*(height=['"]?280[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
 
 # One more. (Where is 200x50 from?)
 #
 
 # One more. (Where is 200x50 from?)
 #
-s|<img\s+[^>]*?(width=['"]?200\D)[^>]*(height=['"]?50[^>]*?)>|<img src=http://config.privoxy.org/send-banner?type=auto $1 $2>|sig
+s|<img\s+[^>]*?(width=['"]?200\D)[^>]*(height=['"]?50[^>]*?)>|<img src="http://config.privoxy.org/send-banner?type=auto" $1 $2>|sig
+
+
+#################################################################################
+#
+# shockwave-flash: Kill embedded Shockwave Flash objects
+#
+#################################################################################
+FILTER: shockwave-flash Kill embedded Shockwave Flash objects
+
+s|<embed [^>]*application/x-shockwave-flash.*</embed>|<!-- Squished Shockwave Flash Embed -->|sigU
 
 
 #################################################################################
 
 
 #################################################################################
@@ -258,6 +262,21 @@ s+^.*warez.*$+<html><head><title>No Warez</title></head><body><h3>You're not sea
 #
 #  Revisions   :
 #     $Log: default.filter,v $
 #
 #  Revisions   :
 #     $Log: default.filter,v $
+#     Revision 1.10  2002/04/18 10:14:19  oes
+#     renamed some filters
+#
+#     Revision 1.9  2002/04/11 07:36:35  oes
+#     Generalized js-popup filter
+#
+#     Revision 1.8  2002/04/10 17:07:21  oes
+#     Fixed potentially desctructive jobs, added noflash filter
+#
+#     Revision 1.7  2002/04/09 18:34:51  oes
+#     Fixed HTML syntax in replacements
+#
+#     Revision 1.6  2002/04/03 19:49:52  swa
+#     name change
+#
 #     Revision 1.5  2002/03/27 15:30:26  swa
 #     have a consistent appearance
 #
 #     Revision 1.5  2002/03/27 15:30:26  swa
 #     have a consistent appearance
 #