[html-formfu] HTMLScrubber filter

Charlie Garrison garrison at zeta.org.au
Wed Jul 14 14:27:58 GMT 2010


Good morning,

On 13/07/10 at 8:26 PM +0100, Nigel Metheringham 
<nigel.metheringham at dev.intechnology.co.uk> wrote:

>On 12 Jul 2010, at 21:02, Nigel Metheringham wrote:
>> Currently the HTMLScrubber filter only supports the allow parameter
>> to HTML::Scrubber.
>
>I went ahead with this change, resulting in the attached patch.
>
>I skipped the process parameter as it causes a name clash with 
>the filter framework.

Did you get the rules attribute to work? I'm using YAML for form 
configs and I can't get the correct list of hashes for rules; I 
keep getting a hash of hashes. Or do I have something wrong with 
my yaml config:

     filter:
       - TrimEdges
       - type: HTMLScrubber
         allow:
           - 'p'
           - 'span'
           - 'strong'
           - 'em'
           - 'u'
         rules:
           - span:
               style: 1
               class: 1
               '*': 0
         default: 0
         comment: 0

I seem to recall a similar issue with something else recently. 
Is there a FormFu util method for converting (fixing) data 
structures that come out of yaml configs?

Related note, I expanded your patch to also update the 
attributes in the clone method. I don't want to submit a patch 
though until I can sort out the rules issue.

Thanks,
Charlie

-- 
    Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt



More information about the HTML-FormFu mailing list