MicProtocol / apps /api /dist /common /escape-html.js
Benaah's picture
Upload folder using huggingface_hub
303c85f verified
Raw History Blame Contribute Delete
497 Bytes
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.escapeHtml = escapeHtml;
function escapeHtml(input) {
if (input === null || input === undefined) {
return "";
}
const str = typeof input === "string" ? input : String(input);
return str
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#x27;");
}
//# sourceMappingURL=escape-html.js.map