The rendered code returned from oembed's embed.ly feature can possibly contain unencoded characters such as a the '&' ampersand symbol. When other filters using loadHTML() occur after the oembed filter, we get invalid markup warnings such as the following:
Warning: DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 1 in _panopoly_wysiwyg_process_caption_filter() (line 392 of /public_html/profiles/panopoly/modules/panopoly/panopoly_wysiwyg/panopoly_wysiwyg.module).
Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 1 in _panopoly_wysiwyg_process_caption_filter() (line 392 of /public_html/profiles/panopoly/modules/panopoly/panopoly_wysiwyg/panopoly_wysiwyg.module).
When the filters of the text format are rearranged so oembed comes last, no warnings are thrown.
Not sure if the caption_filter / panopoly_wysiwyg modules need to have checks to clean this, but it seems more likely this module should perhaps check and encode / clean these strings, for better compatibility / flexibility with other filters.
Otherwise, I'll close this and post in Panopoly.
Active
0.0
Code