([^<]*)(?:\.\.\.)?\s*\s*\
+(
\s*\1)@$2@ig
#################################################################################
#
-# shockwave-flash: Kill embedded Shockwave Flash objects
+# x-httpd-php-to-html: Changes the Content-Type header 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: shockwave-flash Kill embedded Shockwave Flash objects
+SERVER-HEADER-FILTER: x-httpd-php-to-html Changes the Content-Type header from x-httpd-php to html.
-s|||sigU
+s@^(Content-Type:)\s*application/x-httpd-php@$1 text/html@i
+#################################################################################
+#
+# html-to-xml: Changes the Content-Type header from html to xml.
+#
+#################################################################################
+SERVER-HEADER-FILTER: html-to-xml Changes the Content-Type header from html to xml.
+
+s@^(Content-Type:)\s*text/html(;.*)?$@$1 application/xhtml+xml$2@i
#################################################################################
#
-# crude-parental: Crude parental filtering? (Use along with a suitable blocklist).
-# Shows how to deny access to whole page based on a keyword.
+# xml-to-html: Changes the Content-Type header from xml to html.
#
+#################################################################################
+SERVER-HEADER-FILTER: xml-to-html Changes the Content-Type header from xml to html.
+
+s@^(Content-Type:)\s*(?:application|text)/(?:xhtml\+)?xml(;.*)?$@$1 text/html$2@i
+
#################################################################################
#
-# (Note: Middlesex, Sussex and Essex are counties in the UK, not rude words)
-# (Note #2: Is 'sex' a rude word?!)
+# hide-tor-exit-notation: 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: crude-parental Crude parental filtering (demo only)
+CLIENT-HEADER-FILTER: hide-tor-exit-notation Removes the Tor exit node notation in Host and Referer headers.
-s%^.*(?BlockedBlocked due to possible adult content. Please see this site.