Opened 16 years ago

Closed 16 years ago

#1709 closed Bug (duplicate)

IE: Missing semicolon for last declaration in style attributes

Reported by: cloudsift Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: FCKeditor 2.5.1
Keywords: Discussion Cc:

Description

The syntax generated in source view for IE is missing a semicolon when selecting a style or size format.

1.) Hightlight some text 2.) Select a custom style or font size (Highlight Green or Small for example) 3.) View source and take not of the syntax. <span style="font-size: small"> It should be <span style="font-size: small;">

This happens in IE 6 and IE 7 that I have noticed. It outputs correctly in Firefox.

Change History (4)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Component: Core : StylesGeneral
Keywords: Discussion added
Summary: IE 6/7: Missing semicolon to close style="" Version 2.5IE: Missing semicolon for last declaration in style attributes

We don't actually generate the style attribute contents. We simply ask the browser for it. Each browser has its own way to format it, and IE doesn't include the semicolon for the last declaration on style attributes.

It doesn't make much difference, having the last semicolon or not. But the fact is that, IE is doing the right thing, surprisingly.

Looking at the CSS2 specifications, there is nothing saying that the semicolon must be there. The specs instead says that the semicolon is used to "separate" declarations, not "terminate" them:

"A declaration-block ... In between there must be a list of zero or more semicolon-separated (;) declarations"

"Because of the way selectors work, multiple declarations for the same selector may be organized into semicolon (;) separated groups"

Actually, all examples in the specs don't have the semicolon, which makes us thinking that that's the right way to do it.

To conclude, I think that the right thing to do would stripping the last semicolon, instead of appending it.

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Component: GeneralCore : Output Data

comment:3 Changed 16 years ago by Anil K. Jain

this is not a bug, the last item does not need a semmicolon

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: duplicate
Status: newclosed

This one is now part of #1810.

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