From ab5036eef72185f0419108c5b6b73a5181a48da2 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 06 Mar 2012 14:43:49 -0500
Subject: [PATCH] - Merge r5969 from trunk

---
 program/include/rcube_imap_generic.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 00802eb..3fd9610 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -3511,13 +3511,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