') + '';
html += 'CSS is automatically loaded by the JavaScript bundle
';
}
output.innerHTML = html;
} else {
output.innerHTML = '❌ Error: ' + escapeHtml(result.error) + '
';
}
} catch (error) {
output.classList.add('show');
output.innerHTML = '❌ Error: ' + escapeHtml(error.message) + '
';
}
});
function escapeHtml(text) {
const map = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": '''
};
return text.replace(/[&<>"']/g, m => map[m]);
}