fixing forEach error

There is no method forEach on CKEDITOR.htmlParser.element.
Using browser built-in instead.