Problem/Motivation

See #3566536: [meta] eliminate core .module files

Proposed resolution

Move editor_filter_xss() functionality as a public method in element.editor service and deprecate the procedural function.

Remaining tasks

None.

User interface changes

None.

Introduced terminology

None.

API changes

New Drupal\editor\Element::filterXss() method.

Data model changes

None.

Issue fork drupal-3568144

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.

claudiu.cristea’s picture

Assigned: claudiu.cristea » Unassigned
Status: Active » Needs review

Ready for review

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

longwave’s picture

Status: Needs review » Needs work

Merge conflict, and a question about the alter hook, because it seems a bit of a strange way of doing things now.

claudiu.cristea’s picture

Status: Needs work » Needs review

As it was discussed in Slack:

Read for review again.

nicxvan’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#3571237: Refactor \Drupal\editor\Element::filterXss()

I think this is ready.

I'm not seeing where that discussion happened in slack, but most refactoring is being postponed.

I related the issue.

nicxvan’s picture

Status: Reviewed & tested by the community » Needs review

Sorry I forgot I toggled the status, I didn't mean to rtbc quite yet: the comment in the previous comment was meant to be a question.

I see your question in slack @claudiu.cristea, but I don't see a discussion, can you point it out?

If that's confirmed I think we can mark this as ready.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

It was https://drupal.slack.com/archives/C079NQPQUEN/p1769955215025759, you commented there too. I'll add my suggestion in the thread to the other issue.

nicxvan’s picture

Ah I didn't go back far enough!
Thanks!

  • longwave committed f350d615 on main
    refactor: #3568144 Convert editor_filter_xss() to a element.editor...
longwave’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed and pushed this to main, but it doesn't cherry-pick back to 11.x; we need a backport MR.

claudiu.cristea’s picture

Status: Patch (to be ported) » Needs review

Added a new MR !14954 against 11.x. Please review

nicxvan’s picture

Status: Needs review » Reviewed & tested by the community

The backport mr is ready! I compared with the commit and it looks correct.

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

nicxvan’s picture

Status: Reviewed & tested by the community » Needs work

the service id needs to be updated, there is a suggestion.

catch’s picture

claudiu.cristea’s picture

Normally, this is ready. But now I see failures in migrate tests. No idea about the source, this used to pass. Not sure if I only need to update the expectations

nicxvan’s picture

Status: Needs work » Reviewed & tested by the community

I rebased on 11.x, tests are green!

  • godotislate committed bcf27f4b on 11.x
    refactor: #3568144 Convert editor_filter_xss() to a element.editor...
godotislate’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 11.x and published CR. Thanks, everyone!

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

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

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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