Conflict with caption_filter and/or panopoly_wysiwyg.module

Created on 18 June 2015, over 9 years ago
Updated 22 March 2023, over 1 year ago

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.

Feature request
Status

Active

Version

0.0

Component

Code

Created by

🇺🇸United States amaisano Boston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024