doido-view 0.0.11

Default Tera engine, layouts, partials — Action View style templating for Doido.
Documentation
//! Action View-style HTML helpers (forms, links, assets, tags, formatting…).

pub mod asset;
pub mod form;
pub mod hotwire;
pub mod i18n;
pub mod link;
pub mod number;
pub mod sanitize;
pub mod tag;

/// Minimal HTML text/attribute escaping, shared by the helpers.
pub(crate) fn escape(s: &str) -> String {
    s.replace('&', "&")
        .replace('<', "&lt;")
        .replace('>', "&gt;")
        .replace('"', "&quot;")
        .replace('\'', "&#39;")
}