[Privoxy-users] Privoxy-users Digest, Vol 25, Issue 2

H. Hodges h.hodges at gmx.com
Sat Dec 15 20:46:19 UTC 2018


What makes filters and blocks unreliable for blocking Javascript?

Can you add something to the documentation that actually explains how 
to construct filters? You've listed an example filter here and there 
are examples in the Privoxy documentation, but it's difficult to figure 
out the actual structure of filters from examples alone. When you say 
"use a filter like," that tells me nothing because I'm not sure what 
the individual parts of your example do, so I don't know which parts of 
it to use in my own filter. I can refresh my knowledge of regular 
expressions by myself, but it would be nice to know what to apply the 
regular expressions to.

On Wed, Nov 28, 2018 at 4:00 AM, 
privoxy-users-request at lists.privoxy.org wrote:
> Send Privoxy-users mailing list submissions to
> 	privoxy-users at lists.privoxy.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.privoxy.org/mailman/listinfo/privoxy-users
> or, via email, send a message with subject or body 'help' to
> 	privoxy-users-request at lists.privoxy.org
> 
> You can reach the person managing the list at
> 	privoxy-users-owner at lists.privoxy.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Privoxy-users digest..."
> 
> 
> Today's Topics:
> 
>    1. How to Block/Allow Javascript? (H. Hodges)
>    2. Re: How to Block/Allow Javascript? (Fabian Keil)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 12 Nov 2018 14:12:02 -0800
> From: "H. Hodges" <h.hodges at gmx.com>
> To: privoxy-users at lists.privoxy.org
> Subject: [Privoxy-users] How to Block/Allow Javascript?
> Message-ID: <1542060722.2.0 at smtp.gmx.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> I want to block Javascript by default and whitelist some scripts. I
> assume that I need to use filters, but I don't know how to refer to
> Javascript in the rules (for example, *.js or ^script).
> 
> Thanks for any help.
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 27 Nov 2018 16:25:00 +0100
> From: Fabian Keil <fk at fabiankeil.de>
> To: "H. Hodges" <h.hodges at gmx.com>, privoxy-users at lists.privoxy.org
> Subject: Re: [Privoxy-users] How to Block/Allow Javascript?
> Message-ID: <20181127162500.3156cc2b at fabiankeil.de>
> Content-Type: text/plain; charset="us-ascii"
> 
> "H. Hodges" <h.hodges at gmx.com> wrote:
> 
>>  I want to block Javascript by default and whitelist some scripts. I
>>  assume that I need to use filters, but I don't know how to refer to
>>  Javascript in the rules (for example, *.js or ^script).
> 
> You can use both a filter and blocks, however this will
> not work 100% reliable.
> 
> To remove script regions you can use a filter like:
> 
> FILTER: remove-scripts Remove script tags
> s@<script[^>]*>.*</script>@@Ugis
> 
> Additionally you can block URLs ending with js:
> 
> {+block{JavaScript is disabled}}
> /.*\.js
> 
> Some sites embed JavaScript in other tags using event attributes:
> https://en.wikipedia.org/wiki/HTML_attribute#Event_attributes
> 
> Preventing this requires additional filter rules.
> 
> Fabian
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 833 bytes
> Desc: OpenPGP digital signature
> URL: 
> <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20181127/7d600b40/attachment-0001.bin>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> Privoxy-users mailing list
> Privoxy-users at lists.privoxy.org
> https://lists.privoxy.org/mailman/listinfo/privoxy-users
> 
> 
> ------------------------------
> 
> End of Privoxy-users Digest, Vol 25, Issue 2
> ********************************************


More information about the Privoxy-users mailing list