diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-06-20 05:05:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-06-20 05:05:53 +0000 |
commit | 7fd4cc4bf79fbc23e3d95559d8c60a8bf57229f4 (patch) | |
tree | c3378a3f1ac4ee9d3699b1fc6c67cb19619fbf41 /modules/user/user.module | |
parent | 828ba66500f49571f2007cacee25b18dce74336f (diff) | |
download | brdo-7fd4cc4bf79fbc23e3d95559d8c60a8bf57229f4.tar.gz brdo-7fd4cc4bf79fbc23e3d95559d8c60a8bf57229f4.tar.bz2 |
- Bugfix: fixed problem with the use of % on the user module form. Patch
by Slavica. Fixes bug #1730.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 97568191e..e073b1e32 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -101,6 +101,8 @@ function user_save($account, $array = array()) { } else if (substr($key, 0, 4) !== "auth") { if (in_array($key, $user_fields)) { + // escape '%'s: + $value = str_replace("%", "%%", $value); $query .= "$key = '". check_query($value) ."', "; } else { @@ -264,6 +266,18 @@ function user_mail($mail, $subject, $message, $header) { ** - \r\n will work under dos and windows. ** - \n will work for linux, unix and BSDs. ** - \r will work for macs. + ** + ** According to RFC 2646, it's quite rude to not wrap your e-mails: + ** + ** "The Text/Plain media type is the lowest common denominator of + ** Internet email, with lines of no more than 997 characters (by + ** convention usually no more than 80), and where the CRLF sequence + ** represents a line break [MIME-IMT]." + ** + ** CRLF === \r\n + ** + ** http://www.rfc-editor.org/rfc/rfc2646.txt + ** */ return mail($mail, $subject, str_replace("\r", "", $message), $header); } |