core/modules/editor/src/Plugin/Filter/EditorFileReference.php | 4 +--- core/modules/filter/src/FilterProcessResult.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/modules/editor/src/Plugin/Filter/EditorFileReference.php b/core/modules/editor/src/Plugin/Filter/EditorFileReference.php index 96f59c2..37717a0 100644 --- a/core/modules/editor/src/Plugin/Filter/EditorFileReference.php +++ b/core/modules/editor/src/Plugin/Filter/EditorFileReference.php @@ -32,7 +32,6 @@ public function process($text, $langcode) { $result = new FilterProcessResult($text); if (stristr($text, 'data-editor-file-uuid') !== FALSE) { - $all_file_cache_tags = array(); $dom = Html::load($text); $xpath = new \DOMXPath($dom); $processed_uuids = array(); @@ -44,11 +43,10 @@ public function process($text, $langcode) { $file = entity_load_by_uuid('file', $uuid); if ($file) { - $all_file_cache_tags[] = $file->getCacheTag(); + $result->addCacheTags($file->getCacheTag()); } } } - $result->addCacheTags($all_file_cache_tags); } return $result; diff --git a/core/modules/filter/src/FilterProcessResult.php b/core/modules/filter/src/FilterProcessResult.php index deb427e..17f0a13 100644 --- a/core/modules/filter/src/FilterProcessResult.php +++ b/core/modules/filter/src/FilterProcessResult.php @@ -190,7 +190,7 @@ public function getAssets() { * @return $this */ public function addAssets(array $assets) { - $this->assets = NestedArray::mergeDeep($this->assets, $assets); + $this->assets = drupal_merge_attached($this->assets, $assets); return $this; }