Remove unsafe chars. Safe chars chosen to allow simple messages/URLs/email addresses, but avoid anything even possibly remotely dangerous like & or >
Declared in <util/strencodings.h>
std::string
SanitizeString(
std::string_view str,
int rule = SAFE_CHARS_DEFAULT);
A new string without unsafe chars
| Name | Description |
|---|---|
| str [in] | The string to sanitize |
| rule [in] | The set of safe chars to choose (default: least restrictive) |