pub fn filter_non_characters_html(string: &str) -> String {
    let mut output = String::with_capacity(string.len()+5);
    for c in string.chars() {
        match c {
            '\'' | '"' | '\\' => {},
            _ => match gc::of(c) {
                    gc::OtherSymbol |
                    gc::SpaceSeparator |
                    gc::LineSeparator |
                    gc::ParagraphSeparator |
                    gc::Control |
                    gc::Format |
                    gc::Surrogate |
                    gc::PrivateUse |
                    gc::Unassigned 
                        => {},
                      _ => output.push(c),
            },
        }
    }
    output
}
/// Filters out separators, control codes, unicode surrogates, and a few others
/// as well as single/double quotes, backslashes, and angular braces
///
/// Similar to `filter_non_characters()` execpt it keeps angular braces.
/// This is to allow text (that could contain html) to be displayed
/// anywhere on a page safely when combined with the encode_minimal function of
/// the `htmlescape` crate.
Filters out separators, control codes, unicode surrogates, and a few others
as well as single/double quotes, backslashes, and angular braces

Similar to `filter_non_characters()` execpt it keeps angular braces.
This is to allow text (that could contain html) to be displayed
anywhere on a page safely when combined with the encode_minimal function of
the `htmlescape` crate.
Filters out separators control codes unicode surrogates and a few others as well as single / double quotes backslashes and angular braces Similar to ` filter_non_characters () ` execpt it keeps angular braces . This is to allow text ( that could contain html ) to be displayed anywhere on a page safely when combined with the encode_minimal function of the ` htmlescape ` crate .
pub fn filter_non_characters_html(string: &str) -> String {
    let mut output = String::with_capacity(string.len()+5);
    for c in string.chars() {
        match c {
            '\'' | '"' | '\\' => {},
            _ => match gc::of(c) {
                    gc::OtherSymbol |
                    gc::SpaceSeparator |
                    gc::LineSeparator |
                    gc::ParagraphSeparator |
                    gc::Control |
                    gc::Format |
                    gc::Surrogate |
                    gc::PrivateUse |
                    gc::Unassigned 
                        => {},
                      _ => output.push(c),
            },
        }
    }
    output
}
pub fn filter_non_characters_html ( string : & str ) -> String { let mut output = String :: with_capacity ( string . len ( ) + 5 ) ; for c in string . chars ( ) { match c { '\'' | '"' | '\\' => { } , _ => match gc :: of ( c ) { gc :: OtherSymbol | gc :: SpaceSeparator | gc :: LineSeparator | gc :: ParagraphSeparator | gc :: Control | gc :: Format | gc :: Surrogate | gc :: PrivateUse | gc :: Unassigned => { } , _ => output . push ( c ) , } , } } output }
Filters out separators, control codes, unicode surrogates, and a few others
as well as single/double quotes, backslashes, and angular braces
Filters out separators control codes unicode surrogates and a few others as well as single / double quotes backslashes and angular braces
string
&str
string
&str