Skip to main content

Module templates

Module templates 

Source

Structs§

PrintfileData
Data for original hypermail-style %x single-character template substitution, matching the printfile() function in the original hypermail printfile.c.

Functions§

default_article_template
Returns the default article body template (%ARTICLE%).
default_footer_template
Returns the default footer HTML template.
default_header_template
Note: CSP includes ‘unsafe-inline’ in style-src because embedded images in txt2html.rs use inline style attributes (style=“max-width:100%;height:auto”) for responsive sizing. script-src uses a sha256 hash of the fixed inline theme/a11y script instead of ‘unsafe-inline’, so injected <script> content anywhere else in the page (e.g. an unescaped subject) still gets blocked by the browser.
get_header_cookies
Builds the initial cookie map with standard header values (title, stylesheet, metadata, etc.).
set_cookie
Sets a key-value pair in the cookie map.
substitute_cookies
Replaces %KEY% placeholders in a template with values from the cookie map.
substitute_printfile
Perform original hypermail printfile()-style %x substitution on a template string.
unset_cookie
Removes a key from the cookie map.

Type Aliases§

CookieMap