[imp] Attachment download broken

Lars Hecking lhecking at nmrc.ie
Mon Jan 27 20:52:22 PST 2003


Jan Schneider writes:
> Zitat von Lars Hecking <lhecking at nmrc.ucc.ie>:
> 
> > Lars Hecking writes:
> > >
> > >  Since upgrading horde to 2.2, attachement downloads are broken under
> > IE.
> > >  The problem is, if there are spaces in the filename, they are replaced
> > >  with + signs. Interesting enough, this works under UNIX with netscape
> > >  and mozilla (and the d/l'd file is saved under its correct name).
> > 
> >  I have received zero replies to this. Any comments?
> 
> I just tried it with Horde 2.2/IMP 3.1 and can't reproduce it with IE,
> Mozilla or Opera.
 
 Ok. The next thing to try: I patched imp/lib/MIME/Viewer/text.php to get
 rid of these htmlspecialchars warnings (as discussed here previously).

--- 34,51 ----
          }
  
          $charset = $this->getCharset($mime);
+         if ($charset == 'us-ascii') {
+             $charset = 'iso-8859-1';
+         }
+         /* Check for an invalid character set (this code is from
+            NLS::checkCharset() in Horde 3.0). */
+         ini_set('track_errors', 1);
+         @htmlspecialchars('', ENT_COMPAT, $charset);
+         if (isset($php_errormsg)) {
+             $charset = 'iso-8859-1';
+         }
+         ini_restore('track_errors');
+ 
          $text = str_replace('</A>', '</a>', $text); // make sure that the orig



More information about the imp mailing list