﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12774	Image is inserted with styles even when disallowed by ACF	bberg		"This is an extension of ticket #12132 [https://dev.ckeditor.com/ticket/12132][[BR]]
The image dialog still has some ACF issues.

'''Expected behaviour:'''

If you disallow image styles, but still allow their related element attributes, the image dialog should force the usage of the attributes.

Eg: this code

{{{
<img style=""width:30px; height:40px; float:left;"">
}}}

should become

{{{
<img width=""30"" height=""40"" align=""left"">
}}}

'''What actually happens:'''

The image dialog ignores ACF and keeps the styles at first. The ACF rules are only applied after you switch to source code view.

'''How to reproduce:'''

1. set this configuration

{{{
// Allow all elements/attributes/styles/classes by default
config.allowedContent = {
    $1: {
        elements: CKEDITOR.dtd,
        attributes: true,
        styles: true,
        classes: true
    }
};
// Then disallow some styles
config.disallowedContent = 'img{width,height,float}';
// Or all of them
//config.disallowedContent = 'img{*}';
}}}

2. insert an image with width/height/align set.

3. inspect the image element - it contains the style attribute.

4. switch to source code view - the style attribute is gone.
"	Bug	confirmed	Normal		General	4.4.6			Artur Delura Piotrek Koszuliński
