mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Resolve #836
This commit is contained in:
parent
67e359e616
commit
2f22267a77
2 changed files with 6 additions and 2 deletions
|
|
@ -617,6 +617,7 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// literal-string
|
// literal-string
|
||||||
|
$this->hasCapability('LITERAL+')
|
||||||
if (\preg_match('/[\r\n\x00\x80-\xFF]/', $sStringForEscape)) {
|
if (\preg_match('/[\r\n\x00\x80-\xFF]/', $sStringForEscape)) {
|
||||||
return \sprintf("{%d}\r\n%s", \strlen($sStringForEscape), $sStringForEscape);
|
return \sprintf("{%d}\r\n%s", \strlen($sStringForEscape), $sStringForEscape);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -316,8 +316,11 @@ abstract class SearchCriterias
|
||||||
|
|
||||||
public static function escapeSearchString(\MailSo\Imap\ImapClient $oImapClient, string $sSearch) : string
|
public static function escapeSearchString(\MailSo\Imap\ImapClient $oImapClient, string $sSearch) : string
|
||||||
{
|
{
|
||||||
return !\MailSo\Base\Utils::IsAscii($sSearch)
|
// return $oImapClient->EscapeString($sSearch);
|
||||||
? '{'.\strlen($sSearch).'}'."\r\n".$sSearch : $oImapClient->EscapeString($sSearch);
|
// return \MailSo\Base\Utils::IsAscii($sSearch) || $oImapClient->hasCapability('QQMail'))
|
||||||
|
return (\MailSo\Base\Utils::IsAscii($sSearch) || !$oImapClient->hasCapability('LITERAL+'))
|
||||||
|
? $oImapClient->EscapeString($sSearch)
|
||||||
|
: '{'.\strlen($sSearch).'}'."\r\n{$sSearch}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function parseSearchDate(string $sDate) : int
|
private static function parseSearchDate(string $sDate) : int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue