I need to use an email address as the default value of a hidden input field in a form. I also need to have a visible email address on the same page and so have SpamSpan activated on the page. However there seems to be a problem dealing with the hidden input field - it gets partially displayed.

Is there any way I can supress the operation of SpamSpan on one email address in a node (the one in the hidden input field) and yet have it operate on the one that is meant to be displayed?

CommentFileSizeAuthor
#3 twin_email_showing.png33.37 KBjennypanighetti
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

peterx’s picture

Issue summary: View changes

Email addresses can be of the form Jill Brown<Jill.Brown@example.com>. The Spamspan code mentioned something about not handling email addresses in that format. You might be able to use addresses in that format for the addresses you do not want processed and use the simpler Jill.Brown@example.com for the ones you want processed.

peterx’s picture

Status: Active » Closed (cannot reproduce)

1/ Test the Email Field module.
or
2/ Provide more details so I can reproduce the problem.

When you have multiple email addresses connected to a node, the Email Field module might be a better solution. Add two email addresses to the content type. Tell the Email Field module to connect one of the fields to Spamspan.

Spamspan has no way to identify the difference between two addresses in the same text unless you change the format of the email address in some way to make Spamspan not recognise an email address. I mentioned the format with <.

You could write your email in a different format, perhaps replace @ with *, then write a Spamspan style filter to convert the * back to a @ after Spamspan processes the text.

jennypanighetti’s picture

Status: Closed (cannot reproduce) » Active
FileSize
33.37 KB

This is definitely still an issue, in SpamSpan 7.x-1.2.

I have a Full HTML node with hand-created HTML code including an input field, type hidden, with an email address in the value.

I attempted to rewrite the email address as above, with a name and < characters. It's still partially displayed.

vitalie’s picture

@jenstechs, the question is do you want to obfuscate the hidden email or not?

If not, you can proceed as follows:

* create a new text input format, e.g. Full HTML (no Spamspan) - this will be same as Full HMTL, but without Spamspan
* use that for your node with the hidden email

If yes, then it would be best for you to obfuscate it yourself, since whatever that form is posting to would need to "unobfuscate" anyway, even if you use Spamspan. In other words: <input type="hidden" value="my-key-for-the-email">

where whatever application you are sending to will replace my-key-for-the-email with twin...

I am leaving the status to Active for now, but this issue will very likely be "Closed (won't fix)"

jennypanighetti’s picture

Thanks for the answer - a new input type was my workaround too.

I don't mind the email address being obfuscated, but it doesn't work with Spamspan. The other problem is if the user wants other email addresses on that same page to be obfuscated. Would there be a way to filter out any <input> fields and just leave those?

It's okay if this is "Won't Fix" but can it be noted somewhere in docs? Thanks!

Shreya Shetty’s picture

Status: Active » Closed (won't fix)