Preventing multiple signatures in email conversation?

Julian Field MailScanner at ecs.soton.ac.uk
Wed Apr 29 00:21:09 IST 2009



On 28/04/2009 23:06, Kai Schaetzl wrote:
> Julian Field wrote on Tue, 28 Apr 2009 19:02:19 +0100:
>
>    
>> It needs to be in a tag, so I can parse it out easily. That's why I went
>> for an img tag, as the original person who wanted the feature was going
>> to use. If you can suggest an additional attribute of a tag it could go
>> into, I could probably implement that as well. But be warned that all
>> these things slow it all down even further :-(
>>      
> <span id="mailscanner-removeme"></span>
> <div id="mailscanner-removeme"></div>
>
> You could actually wrap that around the whole signature.
> In the example above you could scan for *any* tag with an id of
> id="mailscanner-removeme" and remove that tag from start to end.
>    
I could look for the span or the div and remove that, but I would prefer 
a tag which didn't have a "close tag" equivalent (such as img) as that 
makes the parsing a lot safer and simpler. It's all to do with the way 
that HTML::Parser works, as that does the heavy lifting for me in this case.

So we need a tag that is
a) valid in most HTML standards
b) does not display anything
c) does not need a "close" tag
"img" fitted the bill rather nicely for the original user of the 
feature, as he wanted to display an image anyway. Why not just use the 
"Web Bug Replacement" image in an <img /> tag? You can't see it and it 
fits the other requirements. I agree it's not perfect, but I don't know 
of a perfect solution. But I'm not a web tech, so there may be something 
better that I don't know of.

I just want to look for the tag. If it's there, I don't add the 
signature again. Simple as that. So maybe a <span> with an id with no 
definition would be okay. Is that legal HTML in all the standards?

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
Follow me at twitter.com/JulesFM


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list