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.

AttachmentSize
makingStandarOutput.patch886 bytes

#1

dsoares - October 2, 2007 - 18:59
Category:bug report» feature request
Assigned to:Anonymous» dsoares
Status:needs review» fixed

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 usual mailto: 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 iframe and not a <span>. But after seeing your issue, i saw that a could use another "more W3C compliant" tag. The changes were:

  1. removed the <nobr> tag (why the hell did i use that tag?!) and now use the more compliant CSS property white-space with value nowrap to achieve the same result.
  2. didn't change the <iframe> for a span. 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 target attribute, 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.

AttachmentSize
xhtml_transitional.patch 817 bytes

#2

Anonymous - October 16, 2007 - 19:12
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.