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