Problem/Motivation

Coming from #3568144: Convert editor_filter_xss() to a element.editor service method

Decide on how to modernize:

  • hook_editor_xss_filter_alter() hook can be deprecated.
  • Maybe convert \Drupal\editor\EditorXssFilter\Standard to a service that can be swapped?
  • Original idea was to create a plugin system https://www.drupal.org/node/2099741
  • Dependency injection
  • What else?

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3571237

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

claudiu.cristea created an issue. See original summary.

ben280398 made their first commit to this issue’s fork.

ben280398’s picture

Am working on this. Hope to get a first draft up soon

nicxvan’s picture

Title: Refactor \Drupal\editor\Element::filterXss() » [pp-1] Refactor \Drupal\editor\Element::filterXss()
Status: Active » Postponed

Thank you @ben280398 for taking this on.

This should have been postponed, the other issue needs to get in first.

That being said there are a couple of things: In core we follow the https://www.drupal.org/about/core/policies/core-change-policies/bc-policy as outlined here so we wouldn't delete the deprecated functions here just yet.

I would hold off on further changes for this issue until the related issue is resolved first.

Let me know if you have any questions!

ben280398’s picture

Whoops, just saw this @nicxvan . Will hold off for now, thanks for the heads up man.

berdir’s picture

What I said in slack:

my suggestion would be to put it in a service, call the hook with deprecated flag (->alterDeprecated()), it not altered, call the service. and all that in a follow-up (edited)

nicxvan’s picture

Issue summary: View changes
godotislate’s picture

Title: [pp-1] Refactor \Drupal\editor\Element::filterXss() » Refactor \Drupal\editor\Element::filterXss()
Status: Postponed » Needs work

I think this is unblocked now.