Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

RFC: HTML::?Filter ... suggest a name for the beast

by Jenda (Abbot)
on May 01, 2006 at 13:03 UTC ( [id://546663]=perlmeditation: print w/replies, xml ) Need Help??

Morning lads,
I have a module (what a surprise) I'd like to upload it to CPAN, but ... I can't think of a name.

The module sits on top of HTML::Parser and allows you to filter the tags and attributes in your HTML. You specify what's allowed and everything else it removed.

There is a similar module on CPAN already, HTML::TagFilter, the difference between the two is that

  1. HTML::TagFilter has a lot more options and contains some other more or less related features (mangling email addresses and such)
  2. HTML::TagFilter assumes the filtering is controled by the code, while HTML::?Filter accepts the list of tags and attributes as a single string. Making it easier to use if the list is to be maintained by other people than the developers. (I am using the module in an application that needs to filter the HTML it sends to various clients and the allowed tags vary from client to client. The developers are not involved in setting this up though,the admins can specify what to allow themselves.)

I do think the module could come handy to other people as well, but for the life of me I can't think of a reasonable name. (HTML::Filter is already taken.)

Any suggestions are welcome.

Replies are listed 'Best First'.
Re: RFC: HTML::?Filter ... suggest a name for the beast
by Gavin (Archbishop) on May 01, 2006 at 13:13 UTC
    You said it yourself!!
    HTML::TagFilter::Simple

      That sounds as if it depended on or belonged to the HTML::TagFilter. I would not want to stomp on someone elses namespace. So maybe rather "HTML::SimpleTagFilter".

      I'd rather if we could find a way to communicate that the module is controled by a string containing the allowed tags&attribs instead of from within the code.</P

        Foo::Bar::Simple (or Foo::Bar::Lite) is often written by someone other than the author of Foo::Bar. This is a common practice and well accepted by the community. If you have any concerns, ask modules@perl.org and they'll help out.

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        Maybe something in the way your module's working can give someone an idea? What about posting the POD of the module here, to see it it lights a bulb somewhere?
Re: RFC: HTML::?Filter ... suggest a name for the beast
by eric256 (Parson) on May 01, 2006 at 21:44 UTC
Re: RFC: HTML::?Filter ... suggest a name for the beast
by BrowserUk (Patriarch) on May 01, 2006 at 22:05 UTC

    How about HTML::Subset or HTML::Subset::Filter?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: RFC: HTML::?Filter ... suggest a name for the beast
by GrandFather (Saint) on May 02, 2006 at 03:27 UTC

    HTML::LimitTags?


    DWIM is Perl's answer to Gödel
Re: RFC: HTML::?Filter ... suggest a name for the beast
by sh1tn (Priest) on May 02, 2006 at 03:24 UTC
    s/::Filter/::Cleaner/ ? or maybe Remover


Re: RFC: HTML::?Filter ... suggest a name for the beast
by PodMaster (Abbot) on May 02, 2006 at 00:55 UTC
    I say you keep calling it HTML::JFilter.

    update: or maybe HTML::FilterJ, or HTML::Filterer :)

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: RFC: HTML::?Filter ... suggest a name for the beast
by radiantmatrix (Parson) on May 03, 2006 at 18:28 UTC

    Suggestions, I've got in spades:

    HTML::Tag::*

    1. ::Filter (might be confusing)
    2. ::Cleaner (cleans tags? maybe not...)
    3. ::Remove (removes tags... accurate!)
    4. ::Sieve (keeps some tags, removes others, like a filter in a way)
    5. ::Restrict (restricts HTML to allowed tags)
    6. ::Replace (replaces Tags with other data)

    I've bolded my two favorites. Those are my suggestions. The jury is out on whether they are good suggestions, but you did say that any suggestions were welcome. ;-)

    <-radiant.matrix->
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    I haven't found a problem yet that can't be solved by a well-placed trebuchet
Re: RFC: HTML::?Filter ... suggest a name for the beast
by chanio (Priest) on May 04, 2006 at 03:56 UTC
Re: RFC: HTML::?Filter ... suggest a name for the beast
by sgt (Deacon) on May 04, 2006 at 21:43 UTC
    HTML::TagFilterEasy
Re: RFC: HTML::?Filter ... suggest a name for the beast
by astroboy (Chaplain) on May 12, 2006 at 05:11 UTC
    If I read you module description correctly, HTML::TagFilter isn't the only module that filters tags and attributes. HTML::Scrubber and HTML::Santiser both do this
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found