It would be great if we could specify custom elements in the HTML elements and attributes field since there are now modules like Entity Embed that provide their own element, <drupal-entity></drupal-entity>, and corresponding text filter to render the element in a specific way.

Right now, the regex in _wysiwyg_filter_xss_split() and wysiwyg_filter_parse_valid_elements() does not allow for the inclusion of "-" which is required in the custom element spec.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bneil created an issue. See original summary.

bneil’s picture

Status: Active » Needs review
FileSize
1.28 KB

Here's a patch that includes the hyphen in the regex.

bneil’s picture

Title: Allow custom elements » Allow custom elements (including support for Entity Embed)
BarisW’s picture

Status: Needs review » Reviewed & tested by the community

Thanks. This is really needed to use the Entity Embed module. Please commit.

BarisW’s picture

And applies cleanly to the current dev.

  • axel.rutz committed e311e6a on 7.x-1.x authored by bneil
    Issue #2558239 by bneil: Allow custom elements (including support for...

geek-merlin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.