Making the mail output standard (W3C)
marvil07 - August 22, 2007 - 15:42
| Project: | GTSpam |
| Version: | 5.x-0.2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | dsoares |
| Status: | closed |
Description
When I was validating a web using this module, I had some problems to validate it like XHTML.
1. The <iframe> element does not exist.
2. The <nobr> element does not exist.
So I propose some changes:
1. Change the iframe with a span
2. Quit the nobr element. I know maybe a long mail direction can be cut off, but I think is easy to manage this.
| Attachment | Size |
|---|---|
| makingStandarOutput.patch | 886 bytes |

#1
Hi,
Thank you for pointing out this issue and for your suggestions. I saw your proposal and the patch.
First, a note. The purpose of this module is to achieve the same behaviour as clicking an usual
mailto:link, while obfuscating email addresses to help prevent spambots from collecting them. When an user clicks an usualmailto:link, the browser doesn't change the current page location. It just understands the "protocol"mailto:and calls the user client application to write an email (i think that's the standard behaviour).That's why i was using an
iframeand not a<span>. But after seeing your issue, i saw that a could use another "more W3C compliant" tag. The changes were:<nobr>tag (why the hell did i use that tag?!) and now use the more compliant CSS propertywhite-spacewith valuenowrapto achieve the same result.<iframe>for aspan. With a span, when you click the email address, the current page location is modified (and the user is taken outside the current page). Instead, i used an<object>tag, since it is compliant even with the XHTML-Strict mode.However (and sadly), there's one thing in the module that produces output that is not XHTML-Strict compliant: the anchor
targetattribute, but i can't just cut it off. So, for now, this module can only be XHTML-Transional compliant. A new release was made with the new changed code.#2