bodies.
*
* BUG-020 (orgahair.pl, 2026-09-01): themes build markup inside inline
* JavaScript — `'
'` — and every
* regex-based pass over the page (LazyLoad, WebP, embeds, the LCP
* candidate search, the page audit) treated those strings as real tags:
* LazyLoad injected loading="lazy" into a JS template and the audit
* reported `' + orgaEsc(data.imageLeft) + '` as an image with no
* dimensions. Script bodies are not the document; nothing that rewrites
* or measures tags may look inside them.
*
* @package CachingOut
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Script-body guard.
*
* @since 0.1.17
*/
final class CachingOut_Script_Guard {
/**
* Matches a whole element, including the
* tags. JSON, JSON-LD and template scripts are covered too — a
* rewriter has no business inside any of them.
*
* @var string
*/
const SCRIPT_REGEX = '/