News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[4825] Firefox 8 beta bug

Started by wattie, October 04, 2011, 10:02:17 AM

Previous topic - Next topic

Illori

Quote from: IchBin™ on December 22, 2011, 03:18:46 PM
But for all intensive purpose, you can downgrade without restoring to old data.

and if there are database changes it may cause conflicts with the old files.

IchBin™

Sorry meant to say "can't" downgrade. Restoring to old data would mean wiping out any database changes.
IchBin™        TinyPortal

tfs

Back in reply #62 of this thread I did a find/replace to fix an issue with Firefox that was happening with file attachments that had spaces in the name.  This was causing the patch for SMF 2.07 to break three times on Display.php.  I reversed the Find/Replace shown in my quote below, and then the 2.07 update was able to run without errors.

Quote from: tfs on November 14, 2011, 08:06:39 PM
Find in Display.php:
if ($context['browser']['is_firefox'])
header('Content-Disposition: ' . $disposition . '; filename*="UTF-8\'\'' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_opera'])
header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name) . '"');

elseif ($context['browser']['is_ie'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $utf8name)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"');


Replace:
if ($context['browser']['is_ie8'] || $context['browser']['is_ie7'] || $context['browser']['is_ie6'])
header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)) . '"');

else
header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace('~&#(\d{3,8});~e', '$fixchar(\'$1\')', $real_filename)));


A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Arantor

Funny you should mention this, we had to deal with this too on here ;)

tfs

I had a feeling it was going to bite a few people.  I'd have never had the guts to get past it without remembering (and finding) this old post with the find/replace itemized.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Arantor

Yeah, it bit us while doing the upgrade. But if you'd shouted, we could have pointed you in the right direction ;)

Advertisement: