Skip to main content

MAX_MARKDOWN_HTML_INPUT

Constant MAX_MARKDOWN_HTML_INPUT 

Source
pub const MAX_MARKDOWN_HTML_INPUT: usize = _; // 65_536usize
Expand description

Convert markdown to Telegram-supported HTML subset.

Handles inline */_<i>, **/__<b>, backtick code blocks, and # headers.

Inputs larger than MAX_MARKDOWN_HTML_INPUT bypass the parser and are returned HTML-escaped only — this is a hard ceiling to bound work on attacker-controlled content (F2). The parser itself is linear-time under PEG semantics, so the cap is a secondary guard.