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

avpaderno’s picture

Version: 7.x-0.1-beta3 » 7.x-0.x-dev
Issue tags: -URL encoding
astonvictor’s picture

Status: Active » Closed (outdated)

D7 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.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.