ltijs
Version:
Easily turn your web application into a LTI 1.3 Learning Tool.
15 lines • 663 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.escapeHtmlAttribute = escapeHtmlAttribute;
// sprightly (the templating engine) does no HTML escaping of its own, so a value meant for a quoted HTML
// attribute needs to be escaped by the caller before it ever reaches a template. `&` first, so it doesn't
// double-escape the entities produced by the other replacements.
function escapeHtmlAttribute(value) {
return value
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '<')
.replace(/>/g, '>');
}
//# sourceMappingURL=html-escape.js.map