0
|
1 --TEST--
|
|
2 Bug #19497 Attachment filenames with a slash character
|
|
3 --SKIPIF--
|
|
4 --FILE--
|
|
5 <?php
|
|
6 include "Mail/mime.php";
|
|
7 $Mime = new Mail_mime();
|
|
8
|
|
9 $filename = "test/file.txt";
|
|
10 $Mime->addAttachment('testfile', "text/plain", $filename, FALSE,
|
|
11 'base64', 'attachment', 'ISO-8859-1', '', '', 'quoted-printable', 'base64');
|
|
12
|
|
13 $content = $Mime->get();
|
|
14 $content = str_replace("\n", '', $content);
|
|
15
|
|
16 if (preg_match_all('/(name|filename)=([^\s]+)/i', $content, $matches)) {
|
|
17 echo implode("\n", $matches[2]);
|
|
18 }
|
|
19 ?>
|
|
20 --EXPECT--
|
|
21 "test/file.txt"
|
|
22 "test/file.txt";
|