Changeset 261ea44 in github


Ignore:
Timestamp:
Feb 17, 2011 4:51:26 AM (2 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
4d982d3
Parents:
c5dedd7
Message:
  • Use addcslashes() instead of strtr() for string quoting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap_generic.php

    rab0b51a1 r261ea44  
    33223322            preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5B\x5C\x5D\x7F]+)/', $string) 
    33233323        ) { 
    3324             return '"' . strtr($string, array('"'=>'\\"', '\\' => '\\\\')) . '"'; 
     3324            return '"' . addcslashes($string, '\\"') . '"'; 
    33253325        } 
    33263326 
     
    33313331    static function unEscape($string) 
    33323332    { 
    3333         return strtr($string, array('\\"'=>'"', '\\\\' => '\\')); 
     3333        return stripslashes($string); 
    33343334    } 
    33353335 
Note: See TracChangeset for help on using the changeset viewer.