Re: Privoxy-users Digest, Vol 25, Issue 2
"H. Hodges" <[email protected]>
| Newsgroups | gmane.comp.web.privoxy.user |
|---|---|
| Message-ID | <[email protected]> |
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, [email protected] wrote: > Send Privoxy-users mailing list submissions to > [email protected] > > 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 > [email protected] > > You can reach the person managing the list at > [email protected] > > 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" <[email protected]> > To: [email protected] > Subject: [Privoxy-users] How to Block/Allow Javascript? > Message-ID: <[email protected]> > 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 <[email protected]> > To: "H. Hodges" <[email protected]>, [email protected] > Subject: Re: [Privoxy-users] How to Block/Allow Javascript? > Message-ID: <[email protected]> > Content-Type: text/plain; charset="us-ascii" > > "H. Hodges" <[email protected]> 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 > [email protected] > https://lists.privoxy.org/mailman/listinfo/privoxy-users > > > ------------------------------ > > End of Privoxy-users Digest, Vol 25, Issue 2 > ********************************************