diff --git a/modules/system/classes/VersionYamlProcessor.php b/modules/system/classes/VersionYamlProcessor.php index 81b055250..13aa05b39 100644 --- a/modules/system/classes/VersionYamlProcessor.php +++ b/modules/system/classes/VersionYamlProcessor.php @@ -1,5 +1,6 @@ &$line) { + // Ensure that !!! lines are quoted + // @TODO: This is a brittle workaround, identify the possible cases where this can be a problem + // i.e. quotes inside the message, message part of multi-message update, etc; and resolve them + if (Str::contains($line, ': !!!')) { + $line = Str::replace(': !!!', ': "!!!', $line); + $line .= '"'; + } + + continue; + + + // Surround array keys with quotes if not already $line = preg_replace_callback('/^\s*([\'"]{0}[^\'"\n\r:]+[\'"]{0})\s*:/m', function ($matches) { return '"' . trim($matches[1]) . '":';