1

As shown in the code, I need to type array elements separated by semicolon then space, but this tends to add semicolon then a new line in the HTML.

      let receiver = document.createElement('td');
      tableRow.append(receiver);
      receiver.innerHTML = `To: ${email.recipients.join('; ')}`;
      receiver.classList.add('receiver');

enter image description here

Aya Othman
  • 94
  • 1
  • 7
  • Your JavaScript is vulnerable to XSS - you should set `textContent`, not `innerHTML` - otherwise [an RFC 5322-compliant e-mail address will break your page due to angle-brackets](https://superuser.com/questions/1625686/what-is-the-email-address-format-name-email-called). – Dai Jun 15 '22 at 12:43

0 Answers0