mirror of
https://github.com/itflow-org/itflow
synced 2026-08-17 04:55:13 +00:00
Mail Parser: Completely remove Webklex IMAP and all dependcies
This commit is contained in:
@@ -43,7 +43,8 @@ class MimeToken extends Token
|
||||
public function __construct(LoggerInterface $logger, MbWrapper $charsetConverter, string $value)
|
||||
{
|
||||
parent::__construct($logger, $charsetConverter, $value);
|
||||
$this->value = $this->decodeMime(\preg_replace('/\r|\n/', '', $this->value));
|
||||
$decoded = $this->decodeMime(\preg_replace('/\r|\n/', '', $this->value));
|
||||
$this->value = \preg_replace('/[\r\n]+/', '', $decoded) ?? '';
|
||||
$pattern = self::MIME_PART_PATTERN;
|
||||
$this->canIgnoreSpacesBefore = (bool) \preg_match("/^\s*{$pattern}|\s+/", $this->rawValue);
|
||||
$this->canIgnoreSpacesAfter = (bool) \preg_match("/{$pattern}\s*|\s+\$/", $this->rawValue);
|
||||
|
||||
@@ -64,10 +64,10 @@ class ParameterPart extends NameValuePart
|
||||
|
||||
protected function decodePartValue(string $value, ?string $charset = null) : string
|
||||
{
|
||||
if ($charset !== null) {
|
||||
return $this->convertEncoding(\rawurldecode($value), $charset, true);
|
||||
}
|
||||
return $this->convertEncoding(\rawurldecode($value));
|
||||
$decoded = ($charset !== null)
|
||||
? $this->convertEncoding(\rawurldecode($value), $charset, true)
|
||||
: $this->convertEncoding(\rawurldecode($value));
|
||||
return \preg_replace('/[\r\n]+/', '', $decoded) ?? $decoded;
|
||||
}
|
||||
|
||||
protected function getValueFromParts(array $parts) : string
|
||||
|
||||
Reference in New Issue
Block a user