Function sanitize_string

Source
pub fn sanitize_string(str_: &str, rule: Option<i32>) -> String
Expand description

| Remove unsafe chars. Safe chars chosen | to allow simple messages/URLs/email | addresses, but avoid anything even | possibly remotely dangerous like & | or > | | ———– | @param[in] str |

The string to sanitize
@param[in] rule

| | The set of safe chars to choose (default: | least restrictive) | | ———– | @return | | A new string without unsafe chars |