diff --git a/libraries/src/Changelog/Changelog.php b/libraries/src/Changelog/Changelog.php index 75ce0209b28f8..8c6fbf1d80b7c 100644 --- a/libraries/src/Changelog/Changelog.php +++ b/libraries/src/Changelog/Changelog.php @@ -165,6 +165,14 @@ class Changelog */ protected $folder; + /** + * Text content of the current item. + * + * @var string + * @since __DEPLOY_VERSION__ + */ + private $currentItem = ''; + /** * Gets the reference to the current direct parent * @@ -225,6 +233,10 @@ public function startElement($parser, $name, $attrs = []) $this->$tag->data = ''; } + if ($name === 'ITEM') { + $this->currentItem = ''; + } + // Skip technical elements if ($name === 'CHANGELOGS' || $name === 'CHANGELOG' || $name === 'ITEM') { return; @@ -292,6 +304,15 @@ public function endElement($parser, $name) unset($this->currentChangelog); } break; + case 'ITEM': + $item = trim($this->currentItem); + + if ($item !== '') { + $this->items[] = $item; + } + + $this->currentItem = ''; + break; } } @@ -312,7 +333,7 @@ public function characterData($parser, $data) switch ($tag) { case 'ITEM': - $this->items[] = $data; + $this->currentItem .= $data; break; case 'SECURITY': case 'FIX':