Ticket #1955 (closed Bug: fixed)

Opened 6 years ago

Last modified 6 years ago

Opera: Element names are uppercased in the output

Reported by: fredck Owned by:
Priority: High Milestone: Opera Compatibility
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Opera Cc: hallvord@…

Description

All element names are uppercased on the output produced by FCKeditor with Opera.

Confirmed with Opera build 9812.

Change History

comment:1 Changed 6 years ago by fredck

It is enough to load sample01.html and move to source view to see the problem.

comment:2 Changed 6 years ago by hallvord@…

This is simply about the case of tag names for the innerHTML serialization, no? Opera serializes tag names in upper case like IE does. Given that .innerHTML is an IE thing I have no idea why Gecko has decided to do things differently and return lower case tags.

The problem is here:

FCKXHtml._GetMainXmlString = function()
{
	return '<xhtml>' + this.MainNode.innerHTML + '</xhtml>' ;
}

(from fckxhtml_gecko.js) I doubt this will be fixed from our side. We've been back and forth on it a few times and so far we were too worried about breaking IE-targetted JavaScript to change it.

Possible FCKEditor fix - though I'd worry about the performance impact on large documents, have not tested:

FCKXHtml._GetMainXmlString = function()
{
	return '<xhtml>' + this.MainNode.innerHTML.replace( /<((\/|)[A-Z]*)/g, function( tag ){ return tag.toLowerCase(); } ) + '</xhtml>' ;
}

comment:3 Changed 6 years ago by hallvord@…

For performance considerations it is probably nice to check somewhere if this is required. For example

 FCKBrowserInfo.requiresTagnameLowerCasing = (function(){ 
        var tmp=document.createElement('div');
        tmp.appendChild(document.createElement('b'));
        return tmp.innerHTML.indexOf('<B>')>-1;
})()

and add the appropriate check to FCKXHtml._GetMainXmlString. Note that the code detects the problem and not the browser :)

comment:4 Changed 6 years ago by martinkou

  • Status changed from new to closed
  • Resolution set to fixed

Fixed with [1691].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy