2 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
\r
3 * Copyright (C) 2003-2009 Frederico Caldeira Knabben
\r
5 * == BEGIN LICENSE ==
\r
7 * Licensed under the terms of any of the following licenses at your
\r
10 * - GNU General Public License Version 2 or later (the "GPL")
\r
11 * http://www.gnu.org/licenses/gpl.html
\r
13 * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
\r
14 * http://www.gnu.org/licenses/lgpl.html
\r
16 * - Mozilla Public License Version 1.1 or later (the "MPL")
\r
17 * http://www.mozilla.org/MPL/MPL-1.1.html
\r
21 * This file define the HTML entities handled by the editor.
\r
24 var FCKXHtmlEntities = new Object() ;
\r
26 FCKXHtmlEntities.Initialize = function()
\r
28 if ( FCKXHtmlEntities.Entities )
\r
34 if ( FCKConfig.ProcessHTMLEntities )
\r
36 FCKXHtmlEntities.Entities = {
\r
148 // Other Special Characters
\r
151 // '&':'amp', // This entity is automatically handled by the XHTML parser.
\r
152 // '<':'lt', // This entity is automatically handled by the XHTML parser.
\r
153 '>':'gt', // Opera and Safari don't encode it in their implementation
\r
179 // Process Base Entities.
\r
180 for ( e in FCKXHtmlEntities.Entities )
\r
183 // Include Latin Letters Entities.
\r
184 if ( FCKConfig.IncludeLatinEntities )
\r
256 for ( e in oEntities )
\r
258 FCKXHtmlEntities.Entities[ e ] = oEntities[ e ] ;
\r
265 // Include Greek Letters Entities.
\r
266 if ( FCKConfig.IncludeGreekEntities )
\r
318 '\u03d1':'thetasym',
\r
323 for ( e in oEntities )
\r
325 FCKXHtmlEntities.Entities[ e ] = oEntities[ e ] ;
\r
334 FCKXHtmlEntities.Entities = {
\r
335 '>':'gt' // Opera and Safari don't encode it in their implementation
\r
339 // Even if we are not processing the entities, we must render the
\r
340 // correctly. As we don't want HTML entities, let's use its numeric
\r
341 // representation ( ).
\r
345 // Create the Regex used to find entities in the text.
\r
346 var sRegexPattern = '[' + sChars + ']' ;
\r
348 if ( FCKConfig.ProcessNumericEntities )
\r
349 sRegexPattern = '[^ -~]|' + sRegexPattern ;
\r
351 var sAdditional = FCKConfig.AdditionalNumericEntities ;
\r
353 if ( sAdditional && sAdditional.length > 0 )
\r
354 sRegexPattern += '|' + FCKConfig.AdditionalNumericEntities ;
\r
356 FCKXHtmlEntities.EntitiesRegex = new RegExp( sRegexPattern, 'g' ) ;
\r