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.
Comments
Comment #1
avpadernoComment #2
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.