瀏覽代碼

Task #2867 - The online editor, asciimath plugin: Fixing a javascript error on IE8.

Ivan Tcholakov 15 年之前
父節點
當前提交
87a9f65fb1

+ 8 - 3
main/inc/lib/fckeditor/editor/plugins/asciimath/fckplugin.js

@@ -310,12 +310,17 @@ FCK.UpdateLinkedField = function()
 			}
 
 			var has_script = false ;
-			var head_data = FCK.GetData( false ).match( /<head\s?[^>]*>(.*?)<\/head\s*>/i )[1] ;
+			var head_data = FCK.GetData( false );
 			if ( head_data )
 			{
-				if ( head_data.indexOf( 'ASCIIMathML.js' ) != -1 )
+				head_data = head_data.toString().match( /<head\s?[^>]*>(.*?)<\/head\s*>/i ) ;
+				if ( head_data[1] )
 				{
-					has_script = true ;
+					head_data = head_data[1] ;
+					if ( head_data.indexOf( 'ASCIIMathML.js' ) != -1 )
+					{
+						has_script = true ;
+					}
 				}
 			}
 

文件差異過大導致無法顯示
+ 0 - 0
main/inc/lib/fckeditor/editor/plugins/asciimath/fckplugin_compressed.js


部分文件因文件數量過多而無法顯示