Added header filter x-httpd-php-to-html
authorFabian Keil <fk@fabiankeil.de>
Fri, 6 Oct 2006 18:06:16 +0000 (18:06 +0000)
committerFabian Keil <fk@fabiankeil.de>
Fri, 6 Oct 2006 18:06:16 +0000 (18:06 +0000)
and reverted another img-reorder whitespace
problem.

default.filter

index 78072aa..6e3ba79 100644 (file)
@@ -2,7 +2,7 @@
 # 
 #  File        :  $Source: /cvsroot/ijbswa/current/default.filter,v $
 # 
 # 
 #  File        :  $Source: /cvsroot/ijbswa/current/default.filter,v $
 # 
-#  $Id: default.filter,v 1.24 2006/10/06 11:25:31 fabiankeil Exp $
+#  $Id: default.filter,v 1.25 2006/10/06 15:26:09 fabiankeil Exp $
 #
 #  Purpose     :  Rules to process the content of web pages
 # 
 #
 #  Purpose     :  Rules to process the content of web pages
 # 
@@ -205,7 +205,7 @@ FILTER: img-reorder Reorder attributes in &lt;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.
 
 # 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]+?))([^>]*)\s*width\s*=\s*(["']?)(\d+?)\4|<img $1 width=$4$5$4$3|siUg
 s|<img\s+?([^>]*) src\s*=\s*([^'">\\\s]+)|<img src=$2 $1|sig
 
 s|<img (src=(?:(['"])[^>\\\\2]*\2\|[^'">\\\s]+?))([^>]*)\s*width\s*=\s*(["']?)(\d+?)\4|<img $1 width=$4$5$4$3|siUg
@@ -570,6 +570,18 @@ s@(<div style=\"[^\"]*width:)30em@$1 100%@
 s@background:url\(\"http://www.blogblog.com/rounders[^\"]*\"\).*;@/*$0*/@Ug
 s@(background:\#[a-f\d]{3})( url\(\"http://www.blogblog.com/rounders[^\"]*\"\).*;)@$1 ;/*$2*/@Ug
 
 s@background:url\(\"http://www.blogblog.com/rounders[^\"]*\"\).*;@/*$0*/@Ug
 s@(background:\#[a-f\d]{3})( url\(\"http://www.blogblog.com/rounders[^\"]*\"\).*;)@$1 ;/*$2*/@Ug
 
+#################################################################################
+#
+# x-httpd-php-to-html: Header filter to change the Content-Type from
+#                      x-httpd-php to html. "Content-Type: x-httpd-php"
+#                      is set by clueless PHP users and causes many
+#                      browsers do open a download menu instead of
+#                      rendering the page.
+#
+#################################################################################
+FILTER: x-httpd-php-to-html Header filter to change the Content-Type from x-httpd-php to html.
+s@^(Content-Type:) application/x-httpd-php@$1 text/html@
+
 #################################################################################
 #
 # html-to-xml: Header filter to change the Content-Type from html to xml.
 #################################################################################
 #
 # html-to-xml: Header filter to change the Content-Type from html to xml.
@@ -590,6 +602,16 @@ s@^(Content-Type:) (?:application|text)/(?:xhtml\+)?xml(;.*)?$@$1 text/html$2@
 #
 #  Revisions   :
 #     $Log: default.filter,v $
 #
 #  Revisions   :
 #     $Log: default.filter,v $
+#     Revision 1.25  2006/10/06 15:26:09  fabiankeil
+#     Bumped copyright year.
+#
+#     Reverted parts of the last img-reorder change
+#     which were intended to remove superfluous whitespace
+#     but had the side effect to mess up some tags.
+#
+#     Modified banners-by-size and banners-by-link to
+#     use border value "0" instead of "\0". Fixes BR 1100065.
+#
 #     Revision 1.24  2006/10/06 11:25:31  fabiankeil
 #     Taught img-reorder not to break img tags
 #     with empty src attributes. Fixes BR 1089474.
 #     Revision 1.24  2006/10/06 11:25:31  fabiankeil
 #     Taught img-reorder not to break img tags
 #     with empty src attributes. Fixes BR 1089474.