Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiniMessage::escapeTags does not escape escape characters #998

Open
homchom opened this issue Nov 24, 2023 · 0 comments
Open

MiniMessage::escapeTags does not escape escape characters #998

homchom opened this issue Nov 24, 2023 · 0 comments

Comments

@homchom
Copy link

homchom commented Nov 24, 2023

MiniMessage::escapeTags does not replace single backslashes (\) with double blackslashes (\\), preventing it from being useful in escaping literal strings for deserialization. It is unclear whether this is intended behavior or not, but I figure it is not, because otherwise what is the use case of such a function?

A workaround for now is to escape using serialization, specifically MiniMessage.miniMessage().serialize(Component.text(input)). This works (despite what #997 says) but is suboptimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants