Adding a tag after a defanged tag

From: Noel Clarkson (
Date: Fri 06 Jan 2006 - 04:38:07 GMT

  • Next message: Eric \: "Defang for attachments but not HTML"

    Hi All,

    still trying to get rid of style information between opening and closing
    defanged style tags (get about a page of it in a number of emails), and
    I've realised that if I add a html comment tag after the style tag
    opener, then that fixes the problem for me.

    That is if I have something like:
    <STYLE type=3Dtext/css>BODY {
            FONT-SIZE: 10pt; COLOR: #000000; FONT-STYLE: normal;
    another page or so or more of stuff

    and I run it through anomy which defangs the style tags and I manually
    add <!----- just after the > and before BODY then I don't get any of
    this showing up when I view it (just what I want!!).

    So my question is, is it possible to add a string "<!----" after a
    modified tag or is this not easy or dangerous to do (ie are there side
    effects I haven't thought of). I know that if there are any closing
    angled brackets anywhere in the style info then it won't fully work, but
    the examples I'm getting sent to me all the time don't seem to have any
    html tags etc in them and even if it only fixed a percentage of the
    messages, it would be far better than none.

    If it is possible and not completely messy, about where in the file would I need to look (my Perl ain't that great, I've
    had a look but I'm lost). I'm happy to try things out and try and sort
    it out myself, but if anyone can point me in the right direction, it
    could save me hours of fun.

    I could look at doing it using procmail and sed etc after anomy has done
    it's thing, but I'd rather avoid that to keep it simple.

    Thanks for any suggestions.


    hosted by