Opened 11 years ago
Last modified 10 years ago
#12458 confirmed Bug
CSS style attribute values with semicolons converted to lowercase in IE
| Reported by: | Jeroen | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Output Data | Version: | 4.3 |
| Keywords: | IE | Cc: |
Description
When pasting this source code into CKEditor (tested with 4.4.4) in Internet Explorer (tested with IE11):
<div style="background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==')">Foo</div>
It is changed into the following code when switching back to the WYSIWYG view:
<div style="background-image: url("data:image/png;base64,ivborw0kggoaaaansuheugaaaauaaaafcayaaacnbyblaaaaheleqvqi12p4//8/w38giaxdibke0dhxgljnbaao9txl0y4ohwaaaabjru5erkjggg==");">Foo</div>
Because data URIs are case-sensitive, the image becomes invalid.
The cause is the semicolon before base64. This part of htmldataprocessor.js contains the bug:
if ( CKEDITOR.env.ie ) {
// IE outputs style attribute in capital letters. We should convert
// them back to lower case, while not hurting the values (#5930)
defaultHtmlFilterRulesForAll.attributes.style = function( value, element ) {
return value.replace( /(^|;)([^\:]+)/g, function( match ) {
alert(match);
return match.toLowerCase();
} );
};
}
Change History (2)
comment:1 Changed 11 years ago by
| Keywords: | IE added |
|---|---|
| Status: | new → confirmed |
| Version: | 4.4.4 → 4.3 |

Problem can be reproduced from CKEditor 4.3 in IE8-11.