From: Fabian Keil <fk@fabiankeil.de> Date: Fri, 6 Oct 2006 11:25:31 +0000 (+0000) Subject: Taught img-reorder not to break img tags X-Git-Tag: v_3_0_6~56 X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/@default-cgi@/static/@default-cgi@toggle?a=commitdiff_plain;h=272fe2da2932923f0e285f8be13060a7634a5e6f;p=privoxy.git Taught img-reorder not to break img tags with empty src attributes. Fixes BR 1089474. Thanks to Raphael Moll for reporting. --- diff --git a/default.filter b/default.filter index aa9050df..2ad071a1 100644 --- a/default.filter +++ b/default.filter @@ -2,7 +2,7 @@ # # File : $Source: /cvsroot/ijbswa/current/default.filter,v $ # -# $Id: default.filter,v 1.22 2006/10/04 19:17:14 fabiankeil Exp $ +# $Id: default.filter,v 1.23 2006/10/05 14:46:28 fabiankeil Exp $ # # Purpose : Rules to process the content of web pages # @@ -205,10 +205,10 @@ FILTER: img-reorder Reorder attributes in <img> tags to make the banners-by-* # This makes banners-by-size more effective and allows both banners-by-size # and banners-by-link to preserve the original image URL in the title attribute. -s|<img\s+?([^>]*) src\s*=\s*(['"])([^>\\\2]+)\2|<img src=$2$3$2 $1|siUg +s|<img\s+?([^>]*) src\s*=\s*(['"])([^>\\\2]+)\2|<img src=$2$3$2$1|siUg s|<img\s+?([^>]*) src\s*=\s*([^'">\\\s]+)|<img src=$2 $1|sig -s|<img (src=(?:(['"])[^>\\\\2]+\2\|[^'">\\\s]+?))([^>]*)width\s*=\s*(["']?)(\d+?)\4|<img $1 width=$4$5$4$3|siUg +s|<img (src=(?:(['"])[^>\\\\2]*\2\|[^'">\\\s]+?))([^>\\s]*)\s*width\s*=\s*(["']?)(\d+?)\4|<img $1 width=$4$5$4$3|siUg ################################################################################# @@ -590,6 +590,13 @@ s@^(Content-Type:) (?:application|text)/(?:xhtml\+)?xml(;.*)?$@$1 text/html$2@ # # Revisions : # $Log: default.filter,v $ +# Revision 1.23 2006/10/05 14:46:28 fabiankeil +# Replaced "<" in img-reorder's description with "<". +# +# Modified msn filter to tag ads with classes instead +# of ids. There may be more than one ad per page, +# but ids are required to be unique. +# # Revision 1.22 2006/10/04 19:17:14 fabiankeil # Incorportated Frédéric Crozat's ie-exploits # modification to make it less trigger-happy.