Original article HTML
Quality assessment result
If true, also add the JSON-LD script block
(requires CSP to permit inline scripts). Default: false.
Modified HTML with quality metadata injected, or the
original HTML if no </head> tag is present.
Inject quality metadata into article HTML as a
<meta>tag and, optionally, an inline JSON-LD block.CSP note: An inline
<script type="application/ld+json">element is still an inline script from the browser's perspective. If the page's Content-Security-Policy setsscript-srcwithout'unsafe-inline', the JSON-LD block will be blocked by the browser. To keep things safe:<meta name="quality-score">tag is injected when a</head>insertion point is found (CSP-safe).<script>block is only injected wheninjectJsonLdistrue(default:false). Callers that know their CSP allows inline scripts can opt in.</head>tag the function returns the original HTML unchanged (no injection possible without a<head>section).