Index: /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5246)
+++ /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5247)
@@ -24,5 +24,14 @@
 			target.removeClass( "cke_light_background" );
 			dialog.hide();
-			editor.insertHtml( value );
+			
+			// Firefox has some bug on insert html, so let's process it single (#5170)
+			if ( CKEDITOR.env.gecko )
+			{
+				editor.fire( 'insertSpecialChar', value, editor );
+			}
+			else {
+				editor.insertHtml( value );
+			}
+			
 		}
 	};
Index: /CKEditor/trunk/_source/plugins/specialchar/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/plugin.js	(revision 5246)
+++ /CKEditor/trunk/_source/plugins/specialchar/plugin.js	(revision 5247)
@@ -3,27 +3,58 @@
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
+(function(){
+	/**
+	 * @file Special Character plugin
+	 */
+	
+	CKEDITOR.plugins.add( 'specialchar',
+	{
+		init : function( editor )
+		{
+			var pluginName = 'specialchar';
+	
+			// Register the dialog.
+			CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );
+	
+			// Register the command.
+			editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );
+	
+			// Register the toolbar button.
+			editor.ui.addButton( 'SpecialChar',
+				{
+					label : editor.lang.specialChar.toolbar,
+					command : pluginName
+				});
+			
+			// Register the handler for Firefox (#5170)
+			if ( CKEDITOR.env.gecko )
+			{
+				editor.on( 'insertSpecialChar', function( event )
+					{
+						var range = getRange( editor );
+						
+						if ( range )
+							range.insertNode( editor.document.createText( event.data ));
+						else
+							editor.insertHtml( event.data );
+					}
+				);
+			}
+		}
+	} );
 
-/**
- * @file Special Character plugin
- */
+	function getRange( editor )
+	{
+		// Get the selection ranges.
+		var ranges = editor.getSelection().getRanges();
 
-CKEDITOR.plugins.add( 'specialchar',
-{
-	init : function( editor )
-	{
-		var pluginName = 'specialchar';
+		// Delete the contents of all ranges .
+		for ( var i = ranges.length - 1 ; i >= 0 ; i-- )
+		{
+			ranges[ i ].deleteContents();
+		}
 
-		// Register the dialog.
-		CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );
-
-		// Register the command.
-		editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );
-
-		// Register the toolbar button.
-		editor.ui.addButton( 'SpecialChar',
-			{
-				label : editor.lang.specialChar.toolbar,
-				command : pluginName
-			});
+		// Return the first range.
+		return ranges[ 0 ];
 	}
-} );
+})()
