소스 검색

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

Yannick Warnier 12 년 전
부모
커밋
58699ec3cc
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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 )