Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / datetime_range / src / Plugin / Field / FieldFormatter / DateRangePlainFormatter.php
index 1fb4702cd068f865375e76178e4103edd550792a..0f74fba6440046ccfc1afac5b4f3fd06c389ef6d 100644 (file)
@@ -57,6 +57,13 @@ class DateRangePlainFormatter extends DateTimePlainFormatter {
         }
         else {
           $elements[$delta] = $this->buildDate($start_date);
+
+          if (!empty($item->_attributes)) {
+            $elements[$delta]['#attributes'] += $item->_attributes;
+            // Unset field item attributes since they have been included in the
+            // formatter output and should not be rendered in the field template.
+            unset($item->_attributes);
+          }
         }
       }
     }