From: Fabian K. <fk...@fa...> - 2012-03-29 22:18:38
|
privoxyusers@i.lucanops.net wrote: > On Wed, 2012-03-28 at 01:38 +0100, privoxyusers@i.lucanops.net wrote: > > FILTER: autocomp Turn back on autocomplete on forms > > s@(<[form|input].*)(autocomplete=["|']?off['|"]?)(.*>)@$1\ $3\ <!--\ > > Autocomplete\ deleted\ by\ Privoxy\.\ -->@ig > > > > [.....] > > > > For some reason only tvguide.co.uk seems _really_ slow with this > > autocomplete rule enabled, it must be their use of forms interacting > > with my rule (I bet those dot-stars don't help). > > I have managed to clean that filter up so it performs as I expect, using > less than a second of CPU. > > FILTER: autocomp Turn back on autocomplete on forms > s@(<[form|input][^>]*)autocomplete=['?|"?]off['?|"?]([^>]*>)@$1 $2 > <!-- Autocomplete deleted by Privoxy. -->@Uig > > The filter had some mistakes, and a bit of R'ingTFM helped (or at least > made me try things until the problem went away). Using [^>]* instead of .* can indeed make a huge difference. I assume [form|input] doesn't do what you intended, though, you probably want something like (?:form|input). Additionally I suspect you may want ['"]? instead of ['?|"?]. Fabian |