diff --git a/e107_core/shortcodes/batch/user_shortcodes.php b/e107_core/shortcodes/batch/user_shortcodes.php index a43d74dbb..133cfaa24 100644 --- a/e107_core/shortcodes/batch/user_shortcodes.php +++ b/e107_core/shortcodes/batch/user_shortcodes.php @@ -226,7 +226,9 @@ class user_shortcodes extends e_shortcode function sc_user_email_link($parm) { $tp = e107::getParser(); - return ($this->var['user_hideemail'] && !ADMIN) ? "".LAN_USER_35."" : $tp->parseTemplate("{email={$this->var['user_email']}-link}"); + return /* Condition */ ($this->var['user_hideemail'] && !ADMIN) ? + /* Hidden and Not Admin */ "".LAN_USER_35."" : + /* Not Hidden or Admin */ $tp->parseTemplate("{email={$this->var['user_email']}-link}"); } @@ -234,7 +236,30 @@ class user_shortcodes extends e_shortcode function sc_user_email($parm) { $tp = e107::getParser(); - return ($this->var['user_hideemail'] && !ADMIN) ? "".LAN_USER_35."" : $tp->toHTML($this->var['user_email'],"no_replace"); + return /* Condition */ ($this->var['user_hideemail'] && !ADMIN) ? + /* Hidden and Not Admin */ "".LAN_USER_35."" : + /* Not Hidden or Admin */ "" . strrev($tp->toHTML($this->var['user_email'],"no_replace")) . ""; + ######################################################## + # Security Note - 04 May 2013 # + ######################################################## + # # + # The CSS code direction rtl is an effective way to # + # prevent spam bots from scraping emails that are # + # not hidden. # + # # + # You can find empirical support for this method at # + # . # + # # + # {e_CORE}templates/user_template.php was modified to # + # support this code. In $USER_FULL_TEMPLATE, the # + # LAN_USER_60 value {USER_EMAIL_LINK} was changed to # + # {USER_EMAIL}. I couldn't figure out how the two # + # shortcodes were different, so I took precautions in # + # hopes that the CSS direction won't break actual HTML # + # tags. # + # # + # -- Deltik # + ######################################################## } @@ -745,4 +770,4 @@ class user_shortcodes extends e_shortcode } -?> \ No newline at end of file +?> diff --git a/e107_core/templates/user_template.php b/e107_core/templates/user_template.php index 1b8455441..1e9513ee0 100644 --- a/e107_core/templates/user_template.php +++ b/e107_core/templates/user_template.php @@ -142,7 +142,7 @@ $USER_FULL_TEMPLATE = "{SETIMAGE: w=250}
{USER_EMAIL_ICON} ".LAN_USER_60."
-
{USER_EMAIL_LINK}
+
{USER_EMAIL}
@@ -213,4 +213,4 @@ $USER_EMBED_USERPROFILE_TEMPLATE = " {USER_EMBED_USERPROFILE_CAPTION} {USER_EMBED_USERPROFILE_TEXT}"; -?> \ No newline at end of file +?>