Sanitize article body content for JSON-LD structured data.
Removes newlines and normalizes whitespace to prevent invalid JSON.
Callers should apply fixHtmlNesting to the raw HTML before
escaping and passing it here, so the regex has a chance to match.
Sanitize article body content for JSON-LD structured data. Removes newlines and normalizes whitespace to prevent invalid JSON. Callers should apply fixHtmlNesting to the raw HTML before escaping and passing it here, so the regex has a chance to match.