thomascube
2009-03-02 f54a3a6d41e5700c45120091a57f2c73b804ae25
program/steps/mail/func.inc
@@ -626,7 +626,7 @@
  {
    switch($show_images) {
      case '1': // known senders only
        $CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']);
        $CONTACTS = new rcube_contacts($RCMAIL->db, $_SESSION['user_id']);
        if ($CONTACTS->search('email', $message->sender['mailto'], true, false)->count) {
          $message->set_safe(true);
        }
@@ -707,6 +707,7 @@
  }
    
  $washer = new washtml($wash_opts);
  $washer->add_callback('a', 'rcmail_washtml_callback');
  $washer->add_callback('form', 'rcmail_washtml_callback');
  if ($p['safe']) {  // allow CSS styles, will be sanitized by rcmail_washtml_callback()
@@ -819,6 +820,11 @@
      $out = html::div('form', $content);
      break;
      
    case 'a':
      if ($attrib) $attrib .= ' target="_blank"';
      $out = '<a'.$attrib.'>' . $content . '</a>';
      break;
    case 'style':
      // decode all escaped entities and reduce to ascii strings
      $stripped = preg_replace('/[^a-zA-Z\(:]/', '', rcmail_xss_entitiy_decode($content));