Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
0667123f
Commit
0667123f
authored
14 years ago
by
Elan Ruusamäe
Committed by
Andreas Gohr
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
correctly encode quoted email names
parent
52784dd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/mail.php
+10
-1
10 additions, 1 deletion
inc/mail.php
with
10 additions
and
1 deletion
inc/mail.php
+
10
−
1
View file @
0667123f
...
...
@@ -203,7 +203,16 @@ function mail_encode_address($string,$header='',$names=true){
}
if
(
!
utf8_isASCII
(
$text
)){
$text
=
'=?UTF-8?Q?'
.
mail_quotedprintable_encode
(
$text
,
0
)
.
'?='
;
// put the quotes outside as in =?UTF-8?Q?"Elan Ruusam=C3=A4e"?= vs "=?UTF-8?Q?Elan Ruusam=C3=A4e?="
if
(
preg_match
(
'/^"(.+)"$/'
,
$text
,
$matches
))
{
$text
=
'"=?UTF-8?Q?'
.
mail_quotedprintable_encode
(
$matches
[
1
],
0
)
.
'?="'
;
}
else
{
$text
=
'=?UTF-8?Q?'
.
mail_quotedprintable_encode
(
$text
,
0
)
.
'?='
;
}
// additionally the space character should be encoded as =20 (or each
// word QP encoded separately).
// however this is needed only in mail headers, not globally in mail_quotedprintable_encode().
$text
=
str_replace
(
" "
,
"=20"
,
$text
);
}
}
else
{
$text
=
''
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment