Skip to content

Commit

Permalink
Strict parsing for legacy converted placeholders (#5740)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pop4959 authored Mar 11, 2024
1 parent 570eca2 commit 2cb0af0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 2cb0af0

Please sign in to comment.