Index: /FCKeditor/trunk/_samples/afp/fck.afpa.code
===================================================================
--- /FCKeditor/trunk/_samples/afp/fck.afpa.code	(revision 7664)
+++ /FCKeditor/trunk/_samples/afp/fck.afpa.code	(revision 7665)
@@ -112,6 +112,11 @@
 		ELSE
 			IF AT("gecko",sAgent)>0
-				iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
-				llRetval =iVersion > 20030210
+				iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,4))
+				IF ( 2000 > iVersion )
+					llRetval=.T.
+				ELSE
+					iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
+					llRetval =iVersion > 20030210
+				ENDIF
 			ENDIF
 		ENDIF
Index: /FCKeditor/trunk/fckeditor.afp
===================================================================
--- /FCKeditor/trunk/fckeditor.afp	(revision 7664)
+++ /FCKeditor/trunk/fckeditor.afp	(revision 7665)
@@ -115,6 +115,11 @@
 		ELSE
 			IF AT("gecko/",sAgent)>0
-				iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
-				llRetval =iVersion > 20030210
+				iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,4))
+				IF ( 2000 > iVersion )
+					llRetval=.T.
+				ELSE
+					iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
+					llRetval =iVersion > 20030210
+				ENDIF
 			ENDIF
 		ELSE
Index: /FCKeditor/trunk/fckeditor.asp
===================================================================
--- /FCKeditor/trunk/fckeditor.asp	(revision 7664)
+++ /FCKeditor/trunk/fckeditor.asp	(revision 7665)
@@ -201,6 +201,14 @@
 		FCKeditor_IsCompatibleBrowser = ( iVersion >= 5.5 )
 	ElseIf InStr(sAgent, "Gecko/") > 0 Then
-		iVersion = CLng( Mid( sAgent, InStr( sAgent, "Gecko/" ) + 6, 8 ) )
-		FCKeditor_IsCompatibleBrowser = ( iVersion >= 20030210 )
+		Set re = new RegExp
+		re.IgnoreCase = true
+		re.global = false
+		re.Pattern = "Gecko/\d+\.\d+"
+		If re.Test(sAgent) Then
+			FCKeditor_IsCompatibleBrowser = True
+		Else
+			iVersion = CLng( Mid( sAgent, InStr( sAgent, "Gecko/" ) + 6, 8 ) )
+			FCKeditor_IsCompatibleBrowser = ( iVersion >= 20030210 )
+		End If
 	ElseIf InStr(sAgent, "Opera/") > 0 Then
 		iVersion = CSng( FCKeditor_ToNumericFormat( Mid( sAgent, InStr( sAgent, "Opera/" ) + 6, 4 ) ) )
Index: /FCKeditor/trunk/fckeditor.js
===================================================================
--- /FCKeditor/trunk/fckeditor.js	(revision 7664)
+++ /FCKeditor/trunk/fckeditor.js	(revision 7665)
@@ -309,7 +309,13 @@
 	}
 
-	// Gecko (Opera 9 tries to behave like Gecko at this point).
-	if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) )
-		return true ;
+	if ( navigator.product == "Gecko" )
+	{
+		// introduced in Firefox 17.0
+		if ( sAgent.match(/gecko\/(\d+\.\d+)/i) )
+			return true ;
+		// Gecko (Opera 9 tries to behave like Gecko at this point).
+		if ( navigator.productSub >= 20030210 && !( typeof(opera) == 'object' && opera.postError ) )
+			return true ;
+	}
 
 	// Opera 9.50+
Index: /FCKeditor/trunk/fckeditor.lasso
===================================================================
--- /FCKeditor/trunk/fckeditor.lasso	(revision 7664)
+++ /FCKeditor/trunk/fckeditor.lasso	(revision 7665)
@@ -83,5 +83,5 @@
 			/if;
 			if (client_browser->Find("Gecko/"));
-				#result = client_browser->Substring(client_browser->Find("Gecko/")+6,8)>=20030210;
+				#result = ((2000>client_browser->Substring(client_browser->Find("Gecko/")+6,4)) || (client_browser->Substring(client_browser->Find("Gecko/")+6,8)>=20030210));
 			/if;
 			if (client_browser->Find("Opera/"));
Index: /FCKeditor/trunk/fckeditor.pl
===================================================================
--- /FCKeditor/trunk/fckeditor.pl	(revision 7664)
+++ /FCKeditor/trunk/fckeditor.pl	(revision 7665)
@@ -104,4 +104,6 @@
 		$iVersion = substr($sAgent,index($sAgent,'MSIE') + 5,3);
 		return($iVersion >= 5.5) ;
+	} elsif($sAgent =~ /Gecko\/\d+\.\d+/i) {
+		return true;
 	} elsif($sAgent =~ /Gecko\//i) {
 		$iVersion = substr($sAgent,index($sAgent,'Gecko/') + 6,8);
Index: /FCKeditor/trunk/fckeditor.py
===================================================================
--- /FCKeditor/trunk/fckeditor.py	(revision 7664)
+++ /FCKeditor/trunk/fckeditor.py	(revision 7665)
@@ -120,4 +120,6 @@
 			return False
 		elif (sAgent.find("Gecko/") >= 0):
+			if (re.search(r'Gecko\/\d+\.\d+', sAgent)):
+				return True
 			i = sAgent.find("Gecko/")
 			iVersion = int(sAgent[i+6:i+6+8])
Index: /FCKeditor/trunk/fckeditor_php4.php
===================================================================
--- /FCKeditor/trunk/fckeditor_php4.php	(revision 7664)
+++ /FCKeditor/trunk/fckeditor_php4.php	(revision 7665)
@@ -55,4 +55,7 @@
 	else if ( strpos($sAgent, 'Gecko/') !== false )
 	{
+		// Firefox 17+
+		if (preg_match("|Gecko/\d+\.\d+|", $sAgent))
+			return true;
 		$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
 		return ($iVersion >= 20030210) ;
Index: /FCKeditor/trunk/fckeditor_php5.php
===================================================================
--- /FCKeditor/trunk/fckeditor_php5.php	(revision 7664)
+++ /FCKeditor/trunk/fckeditor_php5.php	(revision 7665)
@@ -55,4 +55,7 @@
 	else if ( strpos($sAgent, 'Gecko/') !== false )
 	{
+		// Firefox 17+
+		if (preg_match("|Gecko/\d+\.\d+|", $sAgent))
+			return true;
 		$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
 		return ($iVersion >= 20030210) ;
Index: /FCKeditor/trunk/fckutils.cfm
===================================================================
--- /FCKeditor/trunk/fckutils.cfm	(revision 7664)
+++ /FCKeditor/trunk/fckutils.cfm	(revision 7665)
@@ -41,5 +41,5 @@
 		}
 	}
-	// check for Gecko ( >= 20030210+ )
+	// check for Gecko ( >= 20030210+ OR >= 17.0 )
 	else if( find( "gecko/", sAgent ) )
 	{
@@ -51,4 +51,10 @@
 			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
 			if( sBrowserVersion GTE 20030210 )
+				isCompatibleBrowser = true;
+		}
+		stResult = reFind( "gecko/([0-9]+\.[0-9]+)", sAgent, 1, true );
+		if( arrayLen( stResult.pos ) eq 2 )
+		{
+			if ( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 17.0)
 				isCompatibleBrowser = true;
 		}
