Maximum allowed length, in CHARACTERS, of an overlay's raw html value.
The browser HTML parser (template.innerHTML = ... in
OverlayManager.sanitizeHtml) runs synchronously on the main thread and is
superlinear in nesting depth, so a large deeply-nested html string can hang
the tab (measured ~1.5 s at 220 KB, ~6 s at 440 KB). Every tag can be an
allowlisted one, so sanitizer hardening cannot help — the ONLY effective bound
is a cap on the raw input size BEFORE it reaches the parser. The largest
legitimate overlay is a few hundred bytes, so 64 KiB is a very generous ceiling.
Oversized values are rejected outright (never truncated — a mid-markup cut can
yield its own broken, deeply-nested fragment).
Maximum allowed length, in CHARACTERS, of an overlay's raw
htmlvalue.The browser HTML parser (
template.innerHTML = ...inOverlayManager.sanitizeHtml) runs synchronously on the main thread and is superlinear in nesting depth, so a large deeply-nestedhtmlstring can hang the tab (measured ~1.5 s at 220 KB, ~6 s at 440 KB). Every tag can be an allowlisted one, so sanitizer hardening cannot help — the ONLY effective bound is a cap on the raw input size BEFORE it reaches the parser. The largest legitimate overlay is a few hundred bytes, so 64 KiB is a very generous ceiling. Oversized values are rejected outright (never truncated — a mid-markup cut can yield its own broken, deeply-nested fragment).