Opened 17 years ago

Closed 17 years ago

#1955 closed Bug (fixed)

Opera: Element names are uppercased in the output

Reported by: Frederico Caldeira Knabben Owned by:
Priority: Must have (possibly next milestone) Milestone: Opera Compatibility
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Opera Cc: Hallvord R. M. Steen (Opera Software)

Description

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

Confirmed with Opera build 9812.

Change History (4)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

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

comment:2 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

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 17 years ago by Hallvord R. M. Steen (Opera Software)

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 17 years ago by Martin Kou

Resolution: fixed
Status: newclosed

Fixed with [1691].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy