escapeText
Escapes special characters in a message so that they are displayed correctly in the chat.
This method can be used to prevent players from injecting malicious code into messages or to ensure that messages are displayed as intended.
Syntax
engine.chat.escapeText(text);
Parameters
Name | Type | Description |
---|---|---|
text | string | The message to escape |
Example
engine.chat.escape('My unescaped {} message');
// results in "My unescaped || message"
Available on: Client Server