Parcourir la source

Tentative fix for the FCKeditor detection flaw for Firefox 17 - refs #5752

Yannick Warnier il y a 12 ans
Parent
commit
58699ec3cc
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      main/inc/lib/fckeditor/fckeditor.php

+ 5 - 1
main/inc/lib/fckeditor/fckeditor.php

@@ -58,7 +58,11 @@ function FCKeditor_IsCompatibleBrowser()
     }
     else if ( strpos($sAgent, 'Gecko/') !== false )
     {
-        $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
+        $iVersion = substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
+        if ( preg_match('/^\d{2,3}\.\d{1,4}\s/', $iVersion) ) {
+          return true;
+        }
+        $iVersion = (int)$iVersion;
         return ($iVersion >= 20030210) ;
     }
     else if ( strpos($sAgent, 'Opera/') !== false )