git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
widget/contact: send from given name
[minimedit.git]
/
widget
/
contact.php
diff --git
a/widget/contact.php
b/widget/contact.php
index a4fccda1a0ca8aead4f0b5f106653696cf05e043..c6e702234b8d8d00e46258d6c5952a75f0108ac2 100644
(file)
--- a/
widget/contact.php
+++ b/
widget/contact.php
@@
-52,6
+52,9
@@
switch ($source) {
$reply = preg_match('/\A[^\s\'@]{1,64}@[.a-zA-Z0-9-]{4,63}\z/', @$input['email'])
? $input['email'] : "noreply@$domain";
$reply = preg_match('/\A[^\s\'@]{1,64}@[.a-zA-Z0-9-]{4,63}\z/', @$input['email'])
? $input['email'] : "noreply@$domain";
+ if ($displayname = @$input['naam']) {
+ $reply = sprintf('"%s" <%s>', addcslashes($displayname, "\\\"\0..\37"), $reply);
+ }
$header = "From: $reply";
foreach (array(
$header = "From: $reply";
foreach (array(