Skip to content

xor-bits/tempest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tempest

a simple html templating macro (prob unsafe to use atm)

async fn index(Path(v): Path<u8>) -> Html<String> {
    let view = view! {
        <html>
            <head>
                <title>"example"</title>
            </head>
            <body>
                // {r#"<script>alert("hello 1");</script>"#}
                // {unsanitized(r#"<script>alert("hello 2");</script>"#)}
                {app(v)}
            </body>
        </html>
    };

    Html(view.to_string())
}

fn app(v: u8) -> impl View {
    view! {
        <p>"Hello: " {v}</p>
    }
}

About

a simple html templating macro (prob unsafe to use)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published