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