From f5a7e12fdfc1ed559bcb1780dda5af2fc10af474 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 24 Mar 2012 13:57:31 -0400
Subject: [PATCH] - Improve ImageMagick's identify isage, fix possible issue with spaces in path (#1488325)
---
program/include/rcube_imap_generic.php | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index cffb250..a664c5b 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -2079,9 +2079,10 @@
$result[$id]->subject = '';
$result[$id]->messageID = 'mid:' . $id;
- $lines = array();
- $line = substr($line, strlen($m[0]) + 2);
- $ln = 0;
+ $headers = null;
+ $lines = array();
+ $line = substr($line, strlen($m[0]) + 2);
+ $ln = 0;
// get complete entry
while (preg_match('/\{([0-9]+)\}\r\n$/', $line, $m)) {
@@ -3616,13 +3617,16 @@
if ($string === null) {
return 'NIL';
}
+
if ($string === '') {
return '""';
}
+
// atom-string (only safe characters)
- if (!$force_quotes && !preg_match('/[\x00-\x20\x22\x28-\x2A\x5B-\x5D\x7B\x7D\x80-\xFF]/', $string)) {
+ if (!$force_quotes && !preg_match('/[\x00-\x20\x22\x25\x28-\x2A\x5B-\x5D\x7B\x7D\x80-\xFF]/', $string)) {
return $string;
}
+
// quoted-string
if (!preg_match('/[\r\n\x00\x80-\xFF]/', $string)) {
return '"' . addcslashes($string, '\\"') . '"';
--
Gitblit v1.9.1