With the Clear Floats Button plugin enabled in WordPress 4.3.1, if I add a <div> with an id attribute the id attribute is stripped away by the visual editor:
1. Switch to the text editor and add `<div id="foo" class="bar">text</div>`.
2. Switch to the visual editor.
3. Switch back to the text editor. The markup now looks like `<div class="bar">text</div>`.
It looks like the problem is in line 56 of clear-floats-button.php:
$init['extended_valid_elements'] = 'div[clear|style|class]';
I assume this is overwriting a default configuration which allows div[id], although I can't see where the default configuration is coming from. This plugin should at least append to the existing allowed attributes rather than overwrite them.
With the Clear Floats Button plugin enabled in WordPress 4.3.1, if I add a
<div>with an id attribute the id attribute is stripped away by the visual editor:It looks like the problem is in line 56 of clear-floats-button.php:
$init['extended_valid_elements'] = 'div[clear|style|class]';I assume this is overwriting a default configuration which allows
div[id], although I can't see where the default configuration is coming from. This plugin should at least append to the existing allowed attributes rather than overwrite them.