webgyrl Posted March 9, 2005 Posted March 9, 2005 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 Quote
TCH-Bruce Posted March 9, 2005 Posted March 9, 2005 Every & character embedded in the code needs to be & A better way to encode email addresses is to not use them and use contact forms. Quote
owatagal Posted March 9, 2005 Posted March 9, 2005 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. Quote
borfast Posted March 9, 2005 Posted March 9, 2005 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. Quote
owatagal Posted March 9, 2005 Posted March 9, 2005 Right--which is why I'd mung the unlinked addresses. As an aside, is munging a common term for that? I picked it up somewhere, but I never really thought about whether that was the actual term or just slang. Quote
cak Posted March 9, 2005 Posted March 9, 2005 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 Quote
webgyrl Posted March 9, 2005 Author Posted March 9, 2005 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. Quote
TCH-Tim Posted March 9, 2005 Posted March 9, 2005 Jim showed me a way to encode it using a PHP include, so I am going to try that and see how it goes. <{POST_SNAPBACK}> I use a PHP include on my personal site. Other possiblities here, but the include is the cleanest and works for me. -Tim Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.