Text and escaping
Literal strings use the same syntax as Rust. Wrap them in double quotes, and use a backslash for escapes.
"Oatmeal, are you crazy?"
If the string is long, or contains many special characters, then it may be worth using raw strings instead:
Rocks, these are my rocks.
Sediments make me sedimental.
Smooth and round,
Asleep in the ground.
Shades of brown
By default, HTML special characters are escaped automatically. Wrap the string in
(PreEscaped()) to disable this escaping. (See the section on splices to learn more about how this works.)
"<script>alert(\"XSS\")</script>" // <script>...
(PreEscaped("<script>alert(\"XSS\")</script>")) // <script>...
If you want to add a
<!DOCTYPE html> declaration to your page, you may use the
maud::DOCTYPE constant instead of writing it out by hand:
(DOCTYPE) // <!DOCTYPE html>