Opened 17 years ago
Closed 17 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 17 years ago by
Component: | Core : Styles → General |
---|---|
Keywords: | Discussion added |
Summary: | IE 6/7: Missing semicolon to close style="" Version 2.5 → IE: Missing semicolon for last declaration in style attributes |
comment:2 Changed 17 years ago by
Component: | General → Core : Output Data |
---|
comment:4 Changed 17 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This one is now part of #1810.
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:
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.