Fixed minor memory leak.
[privoxy.git] / re_filterfile
index 16c073b..3631c26 100644 (file)
@@ -5,6 +5,10 @@
 # Note that you are free to choose the delimter as you
 # see fit.
 #
+# Note: in addidion to the Perl-options egimosx, U is supported
+# and turns the default to ungreedy matching. Add ? to quantifiers
+# to switch back to greedy.
+#
 
 # Kill OnUnload popups. Yummy.
 # check it out on http://www.zdnet.com/zdsubs/yahoo/tree/yfs.html
@@ -30,7 +34,9 @@ s/menubar="?(no|0)"?/menubar=1/ig
 #s/margin(height|width)=[0-9]*//gi
 
 # Remove frameborder=0 and border=0 from framesets
-s/(<frameset[ -z]+)(frame)?border="?(no|0)"?/$1/ig
+#
+s/(<frameset[^>]+?)border=['"]?(no|0)['"]?/$1/ig
+s/(<frameset[^>]+?)frameborder=['"]?(no|0)['"]?/$1/ig
 
 # The status bar is for displaying link targets, not pointless buzzwords.
 # Again, check it out on http://www.airport-cgn.de/
@@ -40,7 +46,29 @@ s/status='.*?';*//ig
 # Kill *all* popups a la popup.c. (But for *all* sites, so I wouldn't do that.)
 #
 # JavaScript: s/window\.open\(/who_wants_this_to.open(/ig
-# HTML      : s/target="?_blank"?/target_who/g
+# HTML      : s/target=['"]?_blank['"]?/target_who/g
+
+# Kill banners by size:
+# (Sizes from http://www.iab.net/iab_banner_standards/bannersizes.html)
+#
+s|<img [^>]*?(width=['"]?468\D)[^>]*(height=['"]?60\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?234\D)[^>]*(height=['"]?60\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?88\D)[^>]*(height=['"]?31\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?120\D)[^>]*(height=['"]?90\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?120\D)[^>]*(height=['"]?60\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?160\D)[^>]*(height=['"]?600\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?120\D)[^>]*(height=['"]?600\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?125\D)[^>]*(height=['"]?125\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?120\D)[^>]*(height=['"]?240\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?180\D)[^>]*(height=['"]?150\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?300\D)[^>]*(height=['"]?250\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?250\D)[^>]*(height=['"]?250\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?240\D)[^>]*(height=['"]?400\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+s|<img [^>]*?(width=['"]?336\D)[^>]*(height=['"]?280\D).*?>|<img src=http://i.j.b/ijb-send-banner $1 $2>|ig
+
+# Squish WebBugs:
+#
+s/<img [^>]*?(width|height) *= *['"]?1\D[^>]*?(width|height) *= *['"]?1\D.*?>/<!-- Squished WebBug -->/ig
 
 # Fun stuff:
 #