Index: /FCKeditor/trunk/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 702)
+++ /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 703)
@@ -755,10 +755,10 @@
 function _FCK_ProtectEvents_ReplaceEvents( eventMatch, attName )
 {
-	return ' ' + attName + '_fckprotectedatt="' + FCKTools.EncodeToHex( eventMatch ) + '"' ;
+	return ' ' + attName + '_fckprotectedatt="' + encodeURIComponent( eventMatch ) + '"' ;
 }
 
 function _FCK_ProtectEvents_RestoreEvents( match, encodedOriginal )
 {
-	return FCKTools.DecodeHex( encodedOriginal ) ;
+	return decodeURIComponent( encodedOriginal ) ;
 }
 
Index: /FCKeditor/trunk/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktools.js	(revision 702)
+++ /FCKeditor/trunk/editor/_source/internals/fcktools.js	(revision 703)
@@ -417,39 +417,4 @@
 }
 
-FCKTools.EncodeToHex = function( str )
-{
-	var symbols = FCKListsLib.HexList ;
-	var output = [] ;
-	// assume code points are 16-bits
-	for ( var i = 0 ; i < str.length ; i++ )
-	{
-		var c = str.charCodeAt( i ) ;
-		var lsn = c & 0x000f ;
-		var second = ( c & 0x00f0 ) >> 4 ;
-		var third = ( c & 0x0f00 ) >> 8 ;
-		var msn = ( c & 0xf000 ) >> 12 ;
-		output.push( [ symbols[msn], symbols[third], symbols[second], symbols[lsn] ].join( "" ) ) ;
-	}
-	return output.join( "" ) ;
-}
-
-FCKTools.DecodeHex = function( hexstr )
-{
-	if ( hexstr.length % 4 != 0 )
-		throw "FCKTools.DecodeHex(): hexstr length must be multiple of 4." ;
-
-	var symbols = FCKListsLib.HexMap ;
-	var output = [] ;
-	for ( var i = 0 ; i < hexstr.length ; i+=4 )
-	{
-		var codePoint = symbols[ hexstr.charAt( i ) ] << 12 ;
-		codePoint |= symbols[ hexstr.charAt( i + 1 ) ] << 8 ;
-		codePoint |= symbols[ hexstr.charAt( i + 2 ) ] << 4 ;
-		codePoint |= symbols[ hexstr.charAt( i + 3 ) ] ;
-		output.push( String.fromCharCode( codePoint ) ) ;
-	}
-	return output.join( "" ) ;
-}
-
 FCKTools.GetDocumentPosition = function( w, node )
 {
Index: /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js	(revision 702)
+++ /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js	(revision 703)
@@ -231,5 +231,5 @@
 		{
 			// Decode the protected string
-			onclick = FCKTools.DecodeHex( onclick ) ;
+			onclick = decodeURIComponent( onclick ) ;
 			
 			oPopupMatch = oRegex.OnClickPopup.exec( onclick ) ;
@@ -564,5 +564,5 @@
 			onclick = BuildOnClickPopup() ;
 			// Encode the attribute
-			onclick = FCKTools.EncodeToHex( " onclick=\"" + onclick + "\"" )  ;
+			onclick = encodeURIComponent( " onclick=\"" + onclick + "\"" )  ;
 			SetAttribute( oLink, 'onclick_fckprotectedatt', onclick ) ;
 		}
@@ -575,5 +575,5 @@
 			{
 				// Decode the protected string
-				onclick = FCKTools.DecodeHex( onclick ) ;
+				onclick = decodeURIComponent( onclick ) ;
 			
 				if( oRegex.OnClickPopup.test( onclick ) )
