ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Email encoding

June 21, 2007 3:43am

Subscribe [2]
  • #1 / Jun 21, 2007 3:43am

    Adam George

    283 posts

    This is a simple question, that I can’t seem to find in the docs or forums - how does one turn off the default encoding of emails entered in the CP publish page?
    (I’m *not* using any {encode} tags).

    The reason behind the question is that users who have javascript turned off don’t see the email address, so I would like to avoid this accessibility issue.

    Thanks!

  • #2 / Jun 21, 2007 10:36am

    Robin Sowell

    13255 posts

    Hm- it doesn’t encode them on mine- but I double checked.  The difference seems to be the setting in ‘Admin- Weblog Admin- Weblog Managment’- for each weblog, you can set whether links and email addresses are automatically converted to links.  If ‘no’- you get the plain email addy.  If yes- it’s a link and encoded.

    So- first option is to switch that to ‘off’.  Second option- if you want to keep it linking but not encoding…  I see a preference for it that may work in the template parser, so we can give that a try if option 1 isn’t what you want.

    Make sense?

  • #3 / Jun 21, 2007 12:40pm

    Derek Jones

    7561 posts

    Adam, you might be interested in the new $encode_type property of the Typography class.  With either a formatting plugin or an extension of the weblog entries tag, you could utilize this to not encode the emails in certain situations.  Or, if you never wanted the javascript to be used, you could simply edit your core.typography.php file and set $encode_type to “noscript”.

  • #4 / Jun 21, 2007 11:22pm

    Adam George

    283 posts

    Thanks Robin and Derek for your responses. It seems almost impossible to get this issue right - there are always trade-offs between anti-spam, usability, ease of data entry, and accessibility. I appreciate your thoughts.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases