diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index db573c4..062361b 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -401,7 +401,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE, $text = str_replace(array("\r\n", "\r"), "\n", $text); // Get a complete list of filters, ordered properly. - $filters = $format->filters()->sort(); + $filters = $format->filters(); // Give filters the chance to escape HTML-like data such as code or formulas. foreach ($filters as $filter) { diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php index 8e0aadd..8b5194e 100644 --- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php @@ -155,6 +155,7 @@ public function filters($instance_id = NULL) { public function getPluginBag() { if (!isset($this->filterBag)) { $this->filterBag = new FilterBag(\Drupal::service('plugin.manager.filter'), $this->filters); + $this->filterBag->sort(); } return $this->filterBag; } diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php index 973cbb7..2c778a5 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php @@ -109,7 +109,7 @@ public function form(array $form, array &$form_state) { // Create filter plugin instances for all available filters, including both // enabled/configured ones as well as new and not yet unconfigured ones. - $filters = $format->filters()->sort(); + $filters = $format->filters(); foreach ($filters as $filter_id => $filter) { // When a filter is missing, it is replaced by the null filter. Remove it // here, so that saving the form will remove the missing filter.