… $buf = preg_replace('~]*>~i', '', $buf); $buf = preg_replace('~]*>~i', '', $buf); // 1) retirer … et ouverts/fermés $buf = preg_replace('~]*>.*?~is', '', $buf); $buf = preg_replace('~]*>~i', '', $buf); // 2) retirer les CSS “globaux” $buf = preg_replace( '~]+href="[^"]*(bootstrap[^"]*\.css|mobil_style\.css|site_style\.css|fonts\.googleapis)[^"]*"[^>]*>~i', '', $buf ); // 3) retirer le ~i', '', $buf ); echo $buf; } function t(array $translations, string $key, string $fallback = ''): string { $val = $translations[$key] ?? ''; if ($val === '') { return $fallback; } return (string) $val; } // Lang HTML $langHtml = preg_match('~^[a-z]{2}(-[A-Z]{2})?$~', (string) ($lang ?? '')) ? (string) $lang : 'ru'; ?> <?php echo htmlspecialchars(t($translations, 'faq_meta_title'), ENT_QUOTES, 'UTF-8'); ?>