Ticket #1955 (closed Bug: fixed)

Opened 2 months ago

Last modified 2 months ago

Opera: Element names are uppercased in the output

Reported by: fredck Assigned to:
Priority: High Milestone: Opera Compatibility
Component: General Version: SVN
Keywords: Confirmed Opera Cc: hallvord@opera.com

Description

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

Confirmed with Opera build 9812.

Change History

02/29/08 13:32:03 changed by fredck

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

03/11/08 05:55:22 changed by hallvord@opera.com

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>' ;
}

03/11/08 06:00:35 changed by hallvord@opera.com

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 :)

03/14/08 07:15:25 changed by martinkou

  • status changed from new to closed.
  • resolution set to fixed.

Fixed with [1691].

Click here for more info about our SVN system.