pub fn escape_for_script_block(json_ld: &str) -> StringExpand description
Escape a JSON-LD string for embedding inside
<script type="application/ld+json">.
Replaces every literal < with the JSON unicode escape <.
The HTML parser scans raw bytes for </script — by eliminating all
< bytes we guarantee no end-tag can form. JSON-LD parsers decode
< back to < natively, so document semantics are preserved.