diff --git a/plume-common/src/utils.rs b/plume-common/src/utils.rs index 4bb23c85..4f55a53a 100644 --- a/plume-common/src/utils.rs +++ b/plume-common/src/utils.rs @@ -466,6 +466,10 @@ pub fn md_to_html<'a>( (buf, mentions.collect(), hashtags.collect()) } +pub fn escape(string: &str) -> askama_escape::Escaped { + askama_escape::escape(string, askama_escape::Html) +} + #[cfg(test)] mod tests { use super::*;