Closed (won't fix)
Project:
Guestbook
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 May 2007 at 18:34 UTC
Updated:
28 Feb 2011 at 15:02 UTC
Hi there
I added functionality to avoid spam to printed email-adresses for the current 5.1 dev release.
The code is LGPL and borrowed from http://smarty.php.net . It implements a javascript encryption as mentioned here: http://smarty.php.net/manual/en/language.function.mailto.php
Edit guestbook.module around line 618 and replace the if clause with this code
if (in_array('email', $display) && !empty($entry['anonemail'])) {
// javascript encoding of emailadress
$string = 'document.write(\'<a href="mailto:'.check_url($entry['anonemail']).'">'.t('E-mail').'</a>\');';
$js_encode = '';
for ($x=0; $x < strlen($string); $x++) {
$js_encode .= '%' . bin2hex($string[$x]);
}
$output .= ' | <script type="text/javascript">eval(unescape(\''.$js_encode.'\'))</script>';
}
Please review.
I'd be happy if you would add it to SVN.
Greets.
Comments
Comment #1
sunThis surely won't be implemented into Guestbook module. However, integrating with other modules (like SpamSpan module) sounds reasonable.
Comment #2
sunhttp://drupal.org/node/202267 has been marked as duplicate of this issue.
Comment #3
sunSince no one worked on this, marking as won't fix.
Comment #4
knalstaaf commentedSuggested obsfucation not working for 6.x-2.0.