Comment by pwdisswordfishq

13 hours ago

Oh great, so where does DOM provide that function?

The great thing with software is you can write your own functions. It would look something like this:

    function html(strings, ...values) {
      let result = strings[0];
      for (let i = 0; i < values.length; i++) {
        result += escapeHtml(values[i]);
        result += strings[i + 1];
      }
      return result;
    }