Strict parsing for legacy converted placeholders (#5740)

This fixes issues where arguments converted implicitly from MiniMessage
are prone to bleeding into the rest of the output.

The fix mostly works since `MINI_MESSAGE_NO_TAGS` is only used for
legacy conversion, while `miniMessageInstance` is used in all other
cases normally. If that were not the case, we would not want strict
parsing everywhere since we don't enforce this in translations anyway.

Fixes #5729
Fixes #5730
Fixes #5732
Fixes #5735

Fixes #5720
Closes #5728
This commit is contained in:
pop4959 2024-03-11 01:14:58 -07:00 committed by GitHub
parent 570eca2e21
commit 2cb0af0ca4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ public final class AdventureUtil {
}
LEGACY_SERIALIZER = builder.build();
MINI_MESSAGE_NO_TAGS = MiniMessage.miniMessage();
MINI_MESSAGE_NO_TAGS = MiniMessage.builder().strict(true).build();
miniMessageInstance = createMiniMessageInstance();
}