[40392] trunk/www/includes/common.inc
ryandesign at macports.org
ryandesign at macports.org
Tue Sep 30 01:41:08 PDT 2008
Revision: 40392
http://trac.macports.org/changeset/40392
Author: ryandesign at macports.org
Date: 2008-09-30 01:41:07 -0700 (Tue, 30 Sep 2008)
Log Message:
-----------
common.inc: obfuscate_email(): escape special characters that might be in the email address. Follow-up to r37825 in which I escaped the result of obfuscate_email() in ports.php (not realizing that it intended to provide HTML-formatted output already) and r40385 in which that escaping was removed.
Modified Paths:
--------------
trunk/www/includes/common.inc
Modified: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc 2008-09-30 08:30:18 UTC (rev 40391)
+++ trunk/www/includes/common.inc 2008-09-30 08:41:07 UTC (rev 40392)
@@ -141,9 +141,11 @@
######################################################################
# Obfuscate e-mail addresses:
+# Input: e-mail address in plain text
+# Output: obfuscated e-mail address in HTML
function obfuscate_email($email) {
$IMGDIR = '/img';
- return '<span class="email">' . str_replace('@', "<img src=\"$IMGDIR/at.gif\" alt=\"at\" />", $email) . '</span>';
+ return '<span class="email">' . str_replace('@', "<img src=\"$IMGDIR/at.gif\" alt=\"at\" />", htmlspecialchars($email)) . '</span>';
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080930/ce4b52dc/attachment.html
More information about the macports-changes
mailing list