"use strict" /* istanbul ignore file */ function getEncodeHtml() { const encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/", } const matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g return function encodeHtml(s) { return typeof s === "string" ? s.replace(matchHTML, (m) => encodeHTMLRules[m] || m) : s } } module.exports = getEncodeHtml