Needs work
Project:
Invisimail
Version:
7.x-1.1
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2007 at 03:25 UTC
Updated:
20 Sep 2016 at 09:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andrewfn commentedAfter some extensive testing I can verify that if the email address is by itself in a field (e.g. a CCK text field), then there must be a space before and after the email address for the address to be processed and hidden.
Comment #2
TheGecko commentedI'm having no luck getting Invisimail to work. Thanks for the info above as the documentation with the module does not help much.
Using Filtered HTML input format, enabled invisimail, moved to the top on rearrange tab, set to automatically create links and with both javascript options tried. None of these will encode the email addresses and with JS turned on I even lose the email address entirely sometimes.
I also want email addresses encoded in cck fields (http://drupal.org/project/email - which is how I got there in the first place) and that does not seem to work either. Adding a space before and after the email address is a no-go for me as it's a field - I can't expect users to do that when submitting, and I cannot even get that to work anyway.
Is there something I am missing here, or am I expecting the module to do something that it actually doesn't?
Thanks.
(Drupal 5.3, latest release versions of cck, email, invisimail)
Comment #3
fseto commentedHope I'm not hijacking the thread, but I just wanted to share my experience & updates to the community.
I also have trouble getting invisimail to work correctly. I'm not sure, but I think the
tag maybe causing conflicts with other html filters. And I don't really want to allow tags past the filters. So while mucking around trying to find out what cause the problem, I stumbled upon a neater way to hide the mail addr! Instead of using document.write, by using a combination of jQuery (jQuery are enabled by default on drupal, right?) & CSS, it degrades gracefully if javascript is disabled on the client side. There's still the problem where plain mail address detection are kinda flacky on its own. Probably have to deal w/ the regex expression. However, integrating the patch from here (http://drupal.org/node/201280), the regex for detecting the mailto link seems to be ok. So in my scenario, I actually reorder so that e-mail encoding is last, letting the url / html filter to convert the e-mail to a link first. In summary, here's what I did to get this working: 1. apply the enclosed patch below. 2. go to input formats (for each required format) and turn on invisimail 3. then go to the Rearrange tab and make it the very last 4. finally go to the configure tab and turn on "automatically create links" (which is what I use), 5. Javascript option doesn't matter, it will always generate "javascript code", but should be still readable for non-javascript clients. 6. to be on the safe side I use a generated e-mail image (http://services.nexodyne.com/email/index.php) instead of text; then create a link for the mailto. **Remember** A. when you're entering data, the input format has to match the input formats that you enabled invisimail filter. ie. I was wondering why it wasn't working, turn out I had it selected to php code. And of course, I didn't enable invisimail in php code format. B. For existing content, it looks like the new code won't run until you 'edit' content and hit 'submit' again. Here's a sample of the generated output for (test@example.com): [note: mail addr is encoded in html, ie. "& # 102;", but it gets converted automatically when posted it here.] Hope this is of use to some of you out there. Thanks.Comment #4
andrewfn commentedI don't want to be discouraging, but unfortunately the way your patch degrades gracefully for non-javascript users is its Achillies heel. The reason is that the spam bots do not use javascript and so will be able to read the mailto's just fine. The very situation where you most want to hide the email address turns out to be the one that reveals it.
If you want a simple demo of this, try "view source" on this page and you will see what a web-page mail scraper would see. The mailto email address is there unprotected.
Comment #5
fseto commentedGood point, it's somewhat hidden. Provided the spam parser can decode the char encoding (not hard to do I imagine), it would see the output as the code above. definitely not infallible, but it's better than nothing.
It would have to remove the tags...not sure really how likely that is. I think the jQuery part is pretty ok, since most of the strings are broken off with '+' and href is not at a typical location for the parser.
A better solution, for instance, would be to use images instead of trying to hide the e-mail w/ the tags. For my needs, using images generated from 3rd party website works. But if someone wants a more generic approach, they can include a set of images (one of each char & punc) and link to those dynamically instead.
Or if the user don't mind, they can expand the e-mail in the innerHtml. ie. test[AT]example[dot]com
Comment #6
Crell commentedComment #7
PaulBunkey commentedInvisimail does not works out-of-the-box and totally lacks the Email Field support... beceuse it is implemented as sub-filter of the Text format.
It took me a while to figure out how to get it to work. But I got it as I understood the main idea:
Invisimail performs email encoding by processing the submitted content text by filter that is configured inside the Text Formats.
I had a drupal site, w/ content type configured to have an Email Field. I've installed the Invisimail and nothing happened. There is no How-to-enable explanation on the module page. After some searching I figured out that Text Format needs to be configured to get obfuscation to work but... There is no option in Email Field to process the contents with Text Format filters !
So the Invisimail enabling sequence for my Drupal 7 site was:
Edit: Instead of Plaint text you can choose any other Text Format. The point is to enable Invisimail formatter on Text Format you going to use to edit the content.
And it's recommended to check "Automatically create links from email addresses" in Filter settings when you configuring your Text Format.
Comment #8
Crell commentedPaulBunkey: No, that's completely wrong. There is a *formatter* provided by invisimail for the Email field, which should work. You absolutely should NOT be changing everything to Plain Text.
Comment #9
PaulBunkey commentedI'm sorry that my post has gotten wrong. Of course you shouldn't change the Text Format of things to Plain text. What I wanted to say is that you absolutely must to set the Text processing of a field containing an e-mail to "Filtered text (user selects text format)" in "Manage fields". And then you must enable invisimail formatter on the Text format you are using on your email-containing field.
Another point I've mentioned that Email Field can not be filtered with Text Formats and Invisimail can't process that kind of fields.
Comment #10
Crell commentedWrong again. You do not use text formats on email fields, period, at all. Invisimail provides a formatter to do so instead. You configure it on the Display Fields tab.
The code for it is right here: http://drupalcode.org/project/invisimail.git/blob/2aebe0c43caca0947e093f...
Comment #11
PaulBunkey commentedYep. I was wrong about Email Field, it can be configured to use Invisimail.
But how could I discover this fact at the earlier stages of site development ? In this thread you can see the Invisimail learning process:
Is it possible to publish clear instructions HOW TO MAKE INVISIMAIL TO WORK ? I bet many people will appreciate that.
Comment #12
alan d. commentedNote that you need to ensure that the filter is below the HTML corrector, otherwise the encoding is translated back to standard HTML!
The order of importance (in Drupal 7) was:
Comment #14
Marbot commentedSo how do I get this working. It was indeed working out of the box in D6. In D7 Email field is a requirement to get it working? I have CKEdtior on my site. Might this be the problem? The only thing I understood from the posts above is that they are supposted to be wrong. Is there the some kind of step by step process? I would love to use Invisimail. Any help will be appreciated.
Comment #15
Marbot commentedYeah, I got it. Post #12 was the solution. I had the HTML corrector doing his job after invisimailing. Stupid me. :(
Comment #16
szt commentedSo you can configure invisimal 7.x-1.1 at this (and maybe more) places:
I.: admin/config/content/formats/[text_format] ([text_format] example: "Full HTML")
Set the "Encode email addresses: Javascript-wrapped HTML entities" checkbox.
Working filter order example:
1. "Convert line breaks into HTML (i.e. br and p)"
2. "Correct faulty and chopped off HTML"
3. "Encode email addresses: Javascript-wrapped HTML entities"
4. "Convert URLs into links"
Don't forget the vertical tabs at the bottom: set the "Automatically create links from email addresses" and set the "Break up text for filtering" also.
II.: admin/structure/types/manage/[content_type]/display (a content type with Email Field)
Set the added email field's format to "Invisimail: Javascript-wrapped HTML entities", and then go to settings (near "hello world" :))) and set "Automatically create links from email addresses.". Then click "Update".
III.: admin/structure/views/view/[view_name]/edit/page for a Views generated page, go to the added email field settings, and set Formatter to "Invisimail: Javascript-wrapped HTML entities", and then set "Automatically create links from email addresses".
IV. And - of course - if you want Invisimail working in a custom block or elsewhere, set the "Text format" to [text_format] (see I.)
Comment #17
stewart.adam commented7.x-1.x still doesn't have a README.txt, the information in #12 and #16 is very valuable and should be included in there I think.
In my case, the following filter order worked for Filtered HTML:
Comment #18
Anthony Fok commentedThe relevant instructions in this email needs to be put into official documentation somewhere, in a README file, and as documentation on drupal.org. Until then, this bug is not really fixed. ;-)
Comment #19
batigolixI learned this the hard way:
Dont stare at the source through the chrome of firefox inspectors. They do not show the invisimailed address
Check the real source of the page.
Good luck!
Comment #20
Anonymous (not verified) commentedThank you all for the clarification about the Text Format configuration for the Encode and filter processing order. Those comments helped me fix my invisimail encoding issue.
Comment #21
howdytom commentedJust want to highlight batigolix's #19 posts.
Do not look up the email address using Inspector or Firebug.
Open the sites SOURCE CODE!!
Comment #22
james.nt@ameexusa.com commented#17 works for me, thanks.
Comment #23
yazzbe commentedUsed Invisimail in the content of a block.
It was not working for me, mails were obfiscated ... untill I enabled (configuration > performance) "Aggregate and compress CSS files"