Skip to content

Commit

Permalink
Merge pull request SimpleMachines#8237 from MissAllSunday/8195-XML-pa…
Browse files Browse the repository at this point in the history
…rser

[2.1] Allow line terminators when parsing package-info xml
  • Loading branch information
Sesquipedalian authored Jun 24, 2024
2 parents 5462b63 + a3aebdf commit 454e67f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Class-Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ protected function _parse($data)
);

// Loop until we're out of data.
while ($data != '')
while ($data !== '')
{
// Find and remove the next tag.
preg_match('/\A<([\w\-:]+)((?:\s+.+?)?)([\s]?\/)?' . '>/', $data, $match);
preg_match('/\A<([\w\-:]+)((?:\s+[\s\S]+?)?)([\s]?\/)?' . '>/', $data, $match);
if (isset($match[0]))
$data = preg_replace('/' . preg_quote($match[0], '/') . '/s', '', $data, 1);

Expand Down

0 comments on commit 454e67f

Please sign in to comment.