UNPKG

ltijs

Version:

Easily turn your web application into a LTI 1.3 Learning Tool.

15 lines • 663 B
"use strict"; 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, '&amp;') .replace(/"/g, '&quot;') .replace(/'/g, '&#39;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;'); } //# sourceMappingURL=html-escape.js.map