import rt 3.8.7
[freeside.git] / rt / share / html / NoAuth / RichText / FCKeditor / editor / _source / internals / fckxhtml.js
1 /*\r
2  * FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
3  * Copyright (C) 2003-2009 Frederico Caldeira Knabben\r
4  *\r
5  * == BEGIN LICENSE ==\r
6  *\r
7  * Licensed under the terms of any of the following licenses at your\r
8  * choice:\r
9  *\r
10  *  - GNU General Public License Version 2 or later (the "GPL")\r
11  *    http://www.gnu.org/licenses/gpl.html\r
12  *\r
13  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
14  *    http://www.gnu.org/licenses/lgpl.html\r
15  *\r
16  *  - Mozilla Public License Version 1.1 or later (the "MPL")\r
17  *    http://www.mozilla.org/MPL/MPL-1.1.html\r
18  *\r
19  * == END LICENSE ==\r
20  *\r
21  * Defines the FCKXHtml object, responsible for the XHTML operations.\r
22  */\r
23 \r
24 var FCKXHtml = new Object() ;\r
25 \r
26 FCKXHtml.CurrentJobNum = 0 ;\r
27 \r
28 FCKXHtml.GetXHTML = function( node, includeNode, format )\r
29 {\r
30         FCKDomTools.CheckAndRemovePaddingNode( FCKTools.GetElementDocument( node ), FCKConfig.EnterMode ) ;\r
31         FCKXHtmlEntities.Initialize() ;\r
32 \r
33         // Set the correct entity to use for empty blocks.\r
34         this._NbspEntity = ( FCKConfig.ProcessHTMLEntities? 'nbsp' : '#160' ) ;\r
35 \r
36         // Save the current IsDirty state. The XHTML processor may change the\r
37         // original HTML, dirtying it.\r
38         var bIsDirty = FCK.IsDirty() ;\r
39 \r
40         // Special blocks are blocks of content that remain untouched during the\r
41         // process. It is used for SCRIPTs and STYLEs.\r
42         FCKXHtml.SpecialBlocks = new Array() ;\r
43 \r
44         // Create the XML DOMDocument object.\r
45         this.XML = FCKTools.CreateXmlObject( 'DOMDocument' ) ;\r
46 \r
47         // Add a root element that holds all child nodes.\r
48         this.MainNode = this.XML.appendChild( this.XML.createElement( 'xhtml' ) ) ;\r
49 \r
50         FCKXHtml.CurrentJobNum++ ;\r
51 \r
52 //      var dTimer = new Date() ;\r
53 \r
54         if ( includeNode )\r
55                 this._AppendNode( this.MainNode, node ) ;\r
56         else\r
57                 this._AppendChildNodes( this.MainNode, node, false ) ;\r
58 \r
59         // Get the resulting XHTML as a string.\r
60         var sXHTML = this._GetMainXmlString() ;\r
61 \r
62 //      alert( 'Time: ' + ( ( ( new Date() ) - dTimer ) ) + ' ms' ) ;\r
63 \r
64         this.XML = null ;\r
65 \r
66         // Safari adds xmlns="http://www.w3.org/1999/xhtml" to the root node (#963)\r
67         if ( FCKBrowserInfo.IsSafari )\r
68                 sXHTML = sXHTML.replace( /^<xhtml.*?>/, '<xhtml>' ) ;\r
69 \r
70         // Strip the "XHTML" root node.\r
71         sXHTML = sXHTML.substr( 7, sXHTML.length - 15 ).Trim() ;\r
72 \r
73         // According to the doctype set the proper end for self-closing tags\r
74         // HTML: <br>\r
75         // XHTML: Add a space, like <br/> -> <br />\r
76         if (FCKConfig.DocType.length > 0 && FCKRegexLib.HtmlDocType.test( FCKConfig.DocType ) )\r
77                 sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, '>');\r
78         else\r
79                 sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');\r
80 \r
81         if ( FCKConfig.ForceSimpleAmpersand )\r
82                 sXHTML = sXHTML.replace( FCKRegexLib.ForceSimpleAmpersand, '&' ) ;\r
83 \r
84         if ( format )\r
85                 sXHTML = FCKCodeFormatter.Format( sXHTML ) ;\r
86 \r
87         // Now we put back the SpecialBlocks contents.\r
88         for ( var i = 0 ; i < FCKXHtml.SpecialBlocks.length ; i++ )\r
89         {\r
90                 var oRegex = new RegExp( '___FCKsi___' + i ) ;\r
91                 sXHTML = sXHTML.replace( oRegex, FCKXHtml.SpecialBlocks[i] ) ;\r
92         }\r
93 \r
94         // Replace entities marker with the ampersand.\r
95         sXHTML = sXHTML.replace( FCKRegexLib.GeckoEntitiesMarker, '&' ) ;\r
96 \r
97         // Restore the IsDirty state if it was not dirty.\r
98         if ( !bIsDirty )\r
99                 FCK.ResetIsDirty() ;\r
100 \r
101         FCKDomTools.EnforcePaddingNode( FCKTools.GetElementDocument( node ), FCKConfig.EnterMode ) ;\r
102         return sXHTML ;\r
103 }\r
104 \r
105 FCKXHtml._AppendAttribute = function( xmlNode, attributeName, attributeValue )\r
106 {\r
107         try\r
108         {\r
109                 if ( attributeValue == undefined || attributeValue == null )\r
110                         attributeValue = '' ;\r
111                 else if ( attributeValue.replace )\r
112                 {\r
113                         if ( FCKConfig.ForceSimpleAmpersand )\r
114                                 attributeValue = attributeValue.replace( /&/g, '___FCKAmp___' ) ;\r
115 \r
116                         // Entities must be replaced in the attribute values.\r
117                         attributeValue = attributeValue.replace( FCKXHtmlEntities.EntitiesRegex, FCKXHtml_GetEntity ) ;\r
118                 }\r
119 \r
120                 // Create the attribute.\r
121                 var oXmlAtt = this.XML.createAttribute( attributeName ) ;\r
122                 oXmlAtt.value = attributeValue ;\r
123 \r
124                 // Set the attribute in the node.\r
125                 xmlNode.attributes.setNamedItem( oXmlAtt ) ;\r
126         }\r
127         catch (e)\r
128         {}\r
129 }\r
130 \r
131 FCKXHtml._AppendChildNodes = function( xmlNode, htmlNode, isBlockElement )\r
132 {\r
133         var oNode = htmlNode.firstChild ;\r
134 \r
135         while ( oNode )\r
136         {\r
137                 this._AppendNode( xmlNode, oNode ) ;\r
138                 oNode = oNode.nextSibling ;\r
139         }\r
140 \r
141         // Trim block elements. This is also needed to avoid Firefox leaving extra\r
142         // BRs at the end of them.\r
143         if ( isBlockElement && htmlNode.tagName && htmlNode.tagName.toLowerCase() != 'pre' )\r
144         {\r
145                 FCKDomTools.TrimNode( xmlNode ) ;\r
146 \r
147                 if ( FCKConfig.FillEmptyBlocks )\r
148                 {\r
149                         var lastChild = xmlNode.lastChild ;\r
150                         if ( lastChild && lastChild.nodeType == 1 && lastChild.nodeName == 'br' )\r
151                                 this._AppendEntity( xmlNode, this._NbspEntity ) ;\r
152                 }\r
153         }\r
154 \r
155         // If the resulting node is empty.\r
156         if ( xmlNode.childNodes.length == 0 )\r
157         {\r
158                 if ( isBlockElement && FCKConfig.FillEmptyBlocks )\r
159                 {\r
160                         this._AppendEntity( xmlNode, this._NbspEntity ) ;\r
161                         return xmlNode ;\r
162                 }\r
163 \r
164                 var sNodeName = xmlNode.nodeName ;\r
165 \r
166                 // Some inline elements are required to have something inside (span, strong, etc...).\r
167                 if ( FCKListsLib.InlineChildReqElements[ sNodeName ] )\r
168                         return null ;\r
169 \r
170                 // We can't use short representation of empty elements that are not marked\r
171                 // as empty in th XHTML DTD.\r
172                 if ( !FCKListsLib.EmptyElements[ sNodeName ] )\r
173                         xmlNode.appendChild( this.XML.createTextNode('') ) ;\r
174         }\r
175 \r
176         return xmlNode ;\r
177 }\r
178 \r
179 FCKXHtml._AppendNode = function( xmlNode, htmlNode )\r
180 {\r
181         if ( !htmlNode )\r
182                 return false ;\r
183 \r
184         switch ( htmlNode.nodeType )\r
185         {\r
186                 // Element Node.\r
187                 case 1 :\r
188                         // If we detect a <br> inside a <pre> in Gecko, turn it into a line break instead.\r
189                         // This is a workaround for the Gecko bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=92921\r
190                         if ( FCKBrowserInfo.IsGecko\r
191                                         && htmlNode.tagName.toLowerCase() == 'br'\r
192                                         && htmlNode.parentNode.tagName.toLowerCase() == 'pre' )\r
193                         {\r
194                                 var val = '\r' ;\r
195                                 if ( htmlNode == htmlNode.parentNode.firstChild )\r
196                                         val += '\r' ;\r
197                                 return FCKXHtml._AppendNode( xmlNode, this.XML.createTextNode( val ) ) ;\r
198                         }\r
199 \r
200                         // Here we found an element that is not the real element, but a\r
201                         // fake one (like the Flash placeholder image), so we must get the real one.\r
202                         if ( htmlNode.getAttribute('_fckfakelement') )\r
203                                 return FCKXHtml._AppendNode( xmlNode, FCK.GetRealElement( htmlNode ) ) ;\r
204 \r
205                         // Ignore bogus BR nodes in the DOM.\r
206                         if ( FCKBrowserInfo.IsGecko &&\r
207                                         ( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) )\r
208                         {\r
209                                 if ( htmlNode.nextSibling )\r
210                                         return false ;\r
211                                 else\r
212                                 {\r
213                                         htmlNode.removeAttribute( '_moz_editor_bogus_node' ) ;\r
214                                         htmlNode.removeAttribute( 'type' ) ;\r
215                                 }\r
216                         }\r
217 \r
218                         // This is for elements that are instrumental to FCKeditor and\r
219                         // must be removed from the final HTML.\r
220                         if ( htmlNode.getAttribute('_fcktemp') )\r
221                                 return false ;\r
222 \r
223                         // Get the element name.\r
224                         var sNodeName = htmlNode.tagName.toLowerCase()  ;\r
225 \r
226                         if ( FCKBrowserInfo.IsIE )\r
227                         {\r
228                                 // IE doens't include the scope name in the nodeName. So, add the namespace.\r
229                                 if ( htmlNode.scopeName && htmlNode.scopeName != 'HTML' && htmlNode.scopeName != 'FCK' )\r
230                                         sNodeName = htmlNode.scopeName.toLowerCase() + ':' + sNodeName ;\r
231                         }\r
232                         else\r
233                         {\r
234                                 if ( sNodeName.StartsWith( 'fck:' ) )\r
235                                         sNodeName = sNodeName.Remove( 0,4 ) ;\r
236                         }\r
237 \r
238                         // Check if the node name is valid, otherwise ignore this tag.\r
239                         // If the nodeName starts with a slash, it is a orphan closing tag.\r
240                         // On some strange cases, the nodeName is empty, even if the node exists.\r
241                         if ( !FCKRegexLib.ElementName.test( sNodeName ) )\r
242                                 return false ;\r
243 \r
244                         // The already processed nodes must be marked to avoid then to be duplicated (bad formatted HTML).\r
245                         // So here, the "mark" is checked... if the element is Ok, then mark it.\r
246                         if ( htmlNode._fckxhtmljob && htmlNode._fckxhtmljob == FCKXHtml.CurrentJobNum )\r
247                                 return false ;\r
248 \r
249                         var oNode = this.XML.createElement( sNodeName ) ;\r
250 \r
251                         // Add all attributes.\r
252                         FCKXHtml._AppendAttributes( xmlNode, htmlNode, oNode, sNodeName ) ;\r
253 \r
254                         htmlNode._fckxhtmljob = FCKXHtml.CurrentJobNum ;\r
255 \r
256                         // Tag specific processing.\r
257                         var oTagProcessor = FCKXHtml.TagProcessors[ sNodeName ] ;\r
258 \r
259                         if ( oTagProcessor )\r
260                                 oNode = oTagProcessor( oNode, htmlNode, xmlNode ) ;\r
261                         else\r
262                                 oNode = this._AppendChildNodes( oNode, htmlNode, Boolean( FCKListsLib.NonEmptyBlockElements[ sNodeName ] ) ) ;\r
263 \r
264                         if ( !oNode )\r
265                                 return false ;\r
266 \r
267                         xmlNode.appendChild( oNode ) ;\r
268 \r
269                         break ;\r
270 \r
271                 // Text Node.\r
272                 case 3 :\r
273                         if ( htmlNode.parentNode && htmlNode.parentNode.nodeName.IEquals( 'pre' ) )\r
274                                 return this._AppendTextNode( xmlNode, htmlNode.nodeValue ) ;\r
275                         return this._AppendTextNode( xmlNode, htmlNode.nodeValue.ReplaceNewLineChars(' ') ) ;\r
276 \r
277                 // Comment\r
278                 case 8 :\r
279                         // IE catches the <!DOTYPE ... > as a comment, but it has no\r
280                         // innerHTML, so we can catch it, and ignore it.\r
281                         if ( FCKBrowserInfo.IsIE && !htmlNode.innerHTML )\r
282                                 break ;\r
283 \r
284                         try { xmlNode.appendChild( this.XML.createComment( htmlNode.nodeValue ) ) ; }\r
285                         catch (e) { /* Do nothing... probably this is a wrong format comment. */ }\r
286                         break ;\r
287 \r
288                 // Unknown Node type.\r
289                 default :\r
290                         xmlNode.appendChild( this.XML.createComment( "Element not supported - Type: " + htmlNode.nodeType + " Name: " + htmlNode.nodeName ) ) ;\r
291                         break ;\r
292         }\r
293         return true ;\r
294 }\r
295 \r
296 // Append an item to the SpecialBlocks array and returns the tag to be used.\r
297 FCKXHtml._AppendSpecialItem = function( item )\r
298 {\r
299         return '___FCKsi___' + ( FCKXHtml.SpecialBlocks.push( item ) - 1 ) ;\r
300 }\r
301 \r
302 FCKXHtml._AppendEntity = function( xmlNode, entity )\r
303 {\r
304         xmlNode.appendChild( this.XML.createTextNode( '#?-:' + entity + ';' ) ) ;\r
305 }\r
306 \r
307 FCKXHtml._AppendTextNode = function( targetNode, textValue )\r
308 {\r
309         var bHadText = textValue.length > 0 ;\r
310         if ( bHadText )\r
311                 targetNode.appendChild( this.XML.createTextNode( textValue.replace( FCKXHtmlEntities.EntitiesRegex, FCKXHtml_GetEntity ) ) ) ;\r
312         return bHadText ;\r
313 }\r
314 \r
315 // Retrieves a entity (internal format) for a given character.\r
316 function FCKXHtml_GetEntity( character )\r
317 {\r
318         // We cannot simply place the entities in the text, because the XML parser\r
319         // will translate & to &amp;. So we use a temporary marker which is replaced\r
320         // in the end of the processing.\r
321         var sEntity = FCKXHtmlEntities.Entities[ character ] || ( '#' + character.charCodeAt(0) ) ;\r
322         return '#?-:' + sEntity + ';' ;\r
323 }\r
324 \r
325 // An object that hold tag specific operations.\r
326 FCKXHtml.TagProcessors =\r
327 {\r
328         a : function( node, htmlNode )\r
329         {\r
330                 // Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1556878).\r
331                 if ( htmlNode.innerHTML.Trim().length == 0 && !htmlNode.name )\r
332                         return false ;\r
333 \r
334                 var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;\r
335                 if ( sSavedUrl != null )\r
336                         FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;\r
337 \r
338 \r
339                 // Anchors with content has been marked with an additional class, now we must remove it.\r
340                 if ( FCKBrowserInfo.IsIE )\r
341                 {\r
342                         // Buggy IE, doesn't copy the name of changed anchors.\r
343                         if ( htmlNode.name )\r
344                                 FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;\r
345                 }\r
346 \r
347                 node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;\r
348 \r
349                 return node ;\r
350         },\r
351 \r
352         area : function( node, htmlNode )\r
353         {\r
354                 var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;\r
355                 if ( sSavedUrl != null )\r
356                         FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;\r
357 \r
358                 // IE ignores the "COORDS" and "SHAPE" attribute so we must add it manually.\r
359                 if ( FCKBrowserInfo.IsIE )\r
360                 {\r
361                         if ( ! node.attributes.getNamedItem( 'coords' ) )\r
362                         {\r
363                                 var sCoords = htmlNode.getAttribute( 'coords', 2 ) ;\r
364                                 if ( sCoords && sCoords != '0,0,0' )\r
365                                         FCKXHtml._AppendAttribute( node, 'coords', sCoords ) ;\r
366                         }\r
367 \r
368                         if ( ! node.attributes.getNamedItem( 'shape' ) )\r
369                         {\r
370                                 var sShape = htmlNode.getAttribute( 'shape', 2 ) ;\r
371                                 if ( sShape && sShape.length > 0 )\r
372                                         FCKXHtml._AppendAttribute( node, 'shape', sShape.toLowerCase() ) ;\r
373                         }\r
374                 }\r
375 \r
376                 return node ;\r
377         },\r
378 \r
379         body : function( node, htmlNode )\r
380         {\r
381                 node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;\r
382                 // Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).\r
383                 node.removeAttribute( 'spellcheck' ) ;\r
384                 return node ;\r
385         },\r
386 \r
387         // IE loses contents of iframes, and Gecko does give it back HtmlEncoded\r
388         // Note: Opera does lose the content and doesn't provide it in the innerHTML string\r
389         iframe : function( node, htmlNode )\r
390         {\r
391                 var sHtml = htmlNode.innerHTML ;\r
392 \r
393                 // Gecko does give back the encoded html\r
394                 if ( FCKBrowserInfo.IsGecko )\r
395                         sHtml = FCKTools.HTMLDecode( sHtml );\r
396 \r
397                 // Remove the saved urls here as the data won't be processed as nodes\r
398                 sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;\r
399 \r
400                 node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;\r
401 \r
402                 return node ;\r
403         },\r
404 \r
405         img : function( node, htmlNode )\r
406         {\r
407                 // The "ALT" attribute is required in XHTML.\r
408                 if ( ! node.attributes.getNamedItem( 'alt' ) )\r
409                         FCKXHtml._AppendAttribute( node, 'alt', '' ) ;\r
410 \r
411                 var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;\r
412                 if ( sSavedUrl != null )\r
413                         FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;\r
414 \r
415                 // Bug #768 : If the width and height are defined inline CSS,\r
416                 // don't define it again in the HTML attributes.\r
417                 if ( htmlNode.style.width )\r
418                         node.removeAttribute( 'width' ) ;\r
419                 if ( htmlNode.style.height )\r
420                         node.removeAttribute( 'height' ) ;\r
421 \r
422                 return node ;\r
423         },\r
424 \r
425         // Fix orphaned <li> nodes (Bug #503).\r
426         li : function( node, htmlNode, targetNode )\r
427         {\r
428                 // If the XML parent node is already a <ul> or <ol>, then add the <li> as usual.\r
429                 if ( targetNode.nodeName.IEquals( ['ul', 'ol'] ) )\r
430                         return FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;\r
431 \r
432                 var newTarget = FCKXHtml.XML.createElement( 'ul' ) ;\r
433 \r
434                 // Reset the _fckxhtmljob so the HTML node is processed again.\r
435                 htmlNode._fckxhtmljob = null ;\r
436 \r
437                 // Loop through all sibling LIs, adding them to the <ul>.\r
438                 do\r
439                 {\r
440                         FCKXHtml._AppendNode( newTarget, htmlNode ) ;\r
441 \r
442                         // Look for the next element following this <li>.\r
443                         do\r
444                         {\r
445                                 htmlNode = FCKDomTools.GetNextSibling( htmlNode ) ;\r
446 \r
447                         } while ( htmlNode && htmlNode.nodeType == 3 && htmlNode.nodeValue.Trim().length == 0 )\r
448 \r
449                 }       while ( htmlNode && htmlNode.nodeName.toLowerCase() == 'li' )\r
450 \r
451                 return newTarget ;\r
452         },\r
453 \r
454         // Fix nested <ul> and <ol>.\r
455         ol : function( node, htmlNode, targetNode )\r
456         {\r
457                 if ( htmlNode.innerHTML.Trim().length == 0 )\r
458                         return false ;\r
459 \r
460                 var ePSibling = targetNode.lastChild ;\r
461 \r
462                 if ( ePSibling && ePSibling.nodeType == 3 )\r
463                         ePSibling = ePSibling.previousSibling ;\r
464 \r
465                 if ( ePSibling && ePSibling.nodeName.toUpperCase() == 'LI' )\r
466                 {\r
467                         htmlNode._fckxhtmljob = null ;\r
468                         FCKXHtml._AppendNode( ePSibling, htmlNode ) ;\r
469                         return false ;\r
470                 }\r
471 \r
472                 node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;\r
473 \r
474                 return node ;\r
475         },\r
476 \r
477         pre : function ( node, htmlNode )\r
478         {\r
479                 var firstChild = htmlNode.firstChild ;\r
480 \r
481                 if ( firstChild && firstChild.nodeType == 3 )\r
482                         node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' ) ) ) ;\r
483 \r
484                 FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;\r
485 \r
486                 return node ;\r
487         },\r
488 \r
489         script : function( node, htmlNode )\r
490         {\r
491                 // The "TYPE" attribute is required in XHTML.\r
492                 if ( ! node.attributes.getNamedItem( 'type' ) )\r
493                         FCKXHtml._AppendAttribute( node, 'type', 'text/javascript' ) ;\r
494 \r
495                 node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( htmlNode.text ) ) ) ;\r
496 \r
497                 return node ;\r
498         },\r
499 \r
500         span : function( node, htmlNode )\r
501         {\r
502                 // Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404).\r
503                 if ( htmlNode.innerHTML.length == 0 )\r
504                         return false ;\r
505 \r
506                 node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;\r
507 \r
508                 return node ;\r
509         },\r
510 \r
511         style : function( node, htmlNode )\r
512         {\r
513                 // The "TYPE" attribute is required in XHTML.\r
514                 if ( ! node.attributes.getNamedItem( 'type' ) )\r
515                         FCKXHtml._AppendAttribute( node, 'type', 'text/css' ) ;\r
516 \r
517                 var cssText = htmlNode.innerHTML ;\r
518                 if ( FCKBrowserInfo.IsIE )      // Bug #403 : IE always appends a \r\n to the beginning of StyleNode.innerHTML\r
519                         cssText = cssText.replace( /^(\r\n|\n|\r)/, '' ) ;\r
520 \r
521                 node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( cssText ) ) ) ;\r
522 \r
523                 return node ;\r
524         },\r
525 \r
526         title : function( node, htmlNode )\r
527         {\r
528                 node.appendChild( FCKXHtml.XML.createTextNode( FCK.EditorDocument.title ) ) ;\r
529 \r
530                 return node ;\r
531         }\r
532 } ;\r
533 \r
534 FCKXHtml.TagProcessors.ul = FCKXHtml.TagProcessors.ol ;\r