HTMLawed strips class attribute

Elgg 2.3.7

We use extended_tinymce and embed plugins. When we add an image, TinyMCE add  class="elgg-photo"  to the img tag. After save the class attribute disappeared. Also when we add some class attribute to p or div tags they disappear after save.

It seems that HTMLawed strips class attribute.

How to add class attribute and other tags to HTMLawed?