// minify.js
const { minify } = require('html-minifier');
const cheerio = require('cheerio');
function sanitizeHtml(html) {
try {
// Remove conditional comments
html = html.replace(//gs, '');
// Fix incomplete URLs
html = html.replace(/src="https?:\/\/[^"]*\.{3}"/g, '');
// Remove problematic script tags
html = html.replace(/