[][src]Function sailfish::runtime::escape::escape_to_string

pub fn escape_to_string(feed: &str, s: &mut String)

write the escaped contents into String

Examples

use sailfish::runtime::escape::escape_to_string;

let mut buf = String::new();
escape_to_string("<h1>Hello, world!</h1>", &mut buf);
assert_eq!(buf, "&lt;h1&gt;Hello, world!&lt;/h1&gt;");