[Privoxy-users] External filter examples

Fabian Keil fk at fabiankeil.de
Thu Jan 12 11:51:18 UTC 2017


Sam Crawford <samcrawford at gmail.com> wrote:

> I've been experimenting with the external-filter functionality, and have
> been trying to get image manipulation working. I have been basing my
> efforts on the examples at the bottom of
> https://www.privoxy.org/user-manual/filter-file.html
> 
> However, whilst I can get external-filters for text content to work, I
> cannot for images. The documentation seems contradictory - it says at the
> top of that section that it only applies to text, but later it gives an
> example using the "convert" utility.

From the URL above:
| Enabled content filters are applied to any content whose "Content Type"
| header is recognised as a sign of text-based content, with the exception
| of text/plain. Use the force-text-mode action to also filter other content. 

Note the second sentence.

> After digging through the source I found the text limitation was indeed
> correct (checks for CT_TEXT); modifying this to allow images as well
> enabled the examples to work.
> 
> I just wanted to check that this was really necessary and I haven't
> missed some option somewhere that would enable the examples to work
> properly?

Modifying the source code isn't necessary but to filter content
Privoxy doesn't recognise as text you have to enable the
force-text-mode action.

Renaming the action is on the TODO list:
| 7)  force-text-mode has a stupid name and should probably
|     be renamed to force-filter-mode.
http://ijbswa.cvs.sourceforge.net/viewvc/ijbswa/current/TODO?view=markup

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/20170112/617cb010/attachment.bin>


More information about the Privoxy-users mailing list