Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: HTML::Scrubber - Perl extension for scrubbing/sanitizing html

by simon.proctor (Vicar)
on Apr 18, 2003 at 17:15 UTC ( [id://251478]=note: print w/replies, xml ) Need Help??


in reply to HTML::Scrubber - Perl extension for scrubbing/sanitizing html

There is a load of IE only JavaScript events that you may want to add. I've written a suite based on similar lines but works on re-formatting and simplifying according to a rule set (sadly I cannot share the code). I can, however, share the events that I have:
my $list = [ 'onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseover', 'onmouseout', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload' ];
Some, like the mouse wheel, are IE 6 only but nm :)

HTH

SP

Replies are listed 'Best First'.
Re^2: HTML::Scrubber - Perl extension for scrubbing/sanitizing html (turn "on" off)
by tye (Sage) on Apr 18, 2003 at 21:05 UTC

    This screams for 'on*' => 0 or perhaps qr/^on/i => 0 support. (:

                    - tye

      Hi, could you explain this? I haven't seen the notation before. Does it mean instead of onunload etc, he would just have 'load' as the list entry?

        He already has an entry

        '*' => 1, # default rule, allow all attributes
        so I was proposing that he add support for a style of option that would allow all attributes that start with "on" to be disallowed.

        I proposed two possible ways to allow the user to specify such, "on*" => 0 or qr/^on/i => 0. The first would require that the code check for "*" in options while the second would require checking for references to Regexp objects.

        Either one would require extra work in the module. But the huge number of attribute names matching on* (and that this list appears to be growing over time) means the extra effort might be worthwhile.

                        - tye

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251478]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found