Dialog text input field does not check the legality of initial string
Initial string in text input in dialog can be set to any illegal value, such as '§'. This character will cause connection lost since it cannot be replace into template command safely.
How to Reproduce?
Make sure your Minecraft version is 1.21.6 Pre-Release 3 or below.
run this command. (\u00a7=§)
/dialog show @s {type: "notice", action: {action: {type: "dynamic/run_command", template: "tellraw @a '$(value)'"}, label: "Do u wanna be kicked from server?"}, title: "title", inputs: [{key: "value", type: "text", label: "text", initial: "\u00a7"}]}
Click the button below.
Now you lose connection form server due to illegal character. Even you are in single player world.
Initial string must be check or must convert the illegal character into save SNBT form. This is unsafe for some server.
Attachments
Comments


Can confirm.

It’s too small in your video, we can’t see
PBR777
(Unassigned)
Community Consensus
Commands
1.21.6 Pre-Release 3
Retrieved