Skip to content

Commit

Permalink
- Merge r5969 from trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Mar 6, 2012
1 parent 053538b commit ab5036e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================

- Fix handling of % character in IMAP protocol (#1488382)
- Fix duplicate names handling in addressbook searches (#1488375)
- Fix displaying of HTML messages from Disqus (#1488372)
- Disable E_STRICT warnings on PHP 5.4
Expand Down
5 changes: 4 additions & 1 deletion program/include/rcube_imap_generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -3511,13 +3511,16 @@ static function escape($string, $force_quotes=false)
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, '\\"') . '"';
Expand Down

0 comments on commit ab5036e

Please sign in to comment.