Jump to content

Xhtml And Encoded Email Links


webgyrl

Recommended Posts

Alright... after reading up on XHTML a bit and seeing as my scrollbars show better when using that DocType... I converted a site to XHTML and am having a strange issue with my email encoding.

 

When the site was HTML 4.01 Transitional everything worked fine.

 

I am encoding the e-mail address through the use of Character Entities. I have a Dreamweaver Extension that does this for me. The method can be seen here:

http://www.wbwip.com/wbw/emailencoder.html

 

For some reason when I converted and uploaded the pages the email addresses won't work and the codes are all wonky.

 

See here:

http://www.indiemanagers.com/contact.htm

 

If you scroll over the email addresses you will see they are prepended with the domain name and the characters all show up. That is not how they are supposed to be. It also renders the email link unusable.

 

Any ideas why this is happening? Is there a better method to encode emails?

 

Thanks

Link to comment
Share on other sites

In my experience, any address a visitor can see on the screen can be picked up by spam bots. This includes any that are supposed to be hidden by character encoding and javascript magic. Basically, if a browser can figure it out, so can a halfway decent spam bot writer.

 

I'd second using a form instead--instant, easy way for people to send email. And if you want to give them the addresses as well, in case they want to write it down and mail you later, then provide them with unlinked munged addresses. Without the "mailto" in the code to alert the spam bot, they should pass without notice.

Link to comment
Share on other sites

Actually, spambots would capture any e-mail address, even if it's not linke as a mailto: address. That's why people use "name _at_ domain _dot_ com" or even "name@domain.nospam.com" and alert visitors to make the necessary alterations to the address.

Link to comment
Share on other sites

Every & character embedded in the code needs to be &

 

Looks like the encoder is generating decimal NCR's (Numeric Character References). The syntax for a decimal NCR is "D;", where D is a decimal number, refers to the ISO 10646 decimal character number D.

htt*://www.w3.org/TR/REC-html40/charset.html#h-5.3.1

 

I see "&#D;" on the contact page, which is incorrect. However, the web version seems to be generating the correct NCR format.

 

HTH,

Carol

Link to comment
Share on other sites

Thanks guys.

 

The form is coming, but there are also a zillion emails that need to be on several pages throughout the site. That is the way the site owner wants it to be. Each time there is an instance of an email I can't have a form. For the contact page, I can... so that is in the works.

 

Jim showed me a way to encode it using a PHP include, so I am going to try that and see how it goes.

 

Thanks for the tips and explanations.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...