wjdp / htmltest

:white_check_mark: Test generated HTML for problems
MIT License
323 stars 54 forks source link

mailto URIs with multiple recipients not accepted #233

Open Qup42 opened 4 months ago

Qup42 commented 4 months ago

Describe the bug

The standard for the mailto schema (RFC6068) allows multiple recipients that are separated by ,. One example ismailto:foo@example.com,bar@example.com. Such links that contain multiple recipients are incorrectly flagged as invalid by htmltest.

To Reproduce

Steps to reproduce the behaviour:

  1. Run with empty config on index.html: htmltest index.html
  2. See error

.htmltest.yml (empty)

index.html

<!DOCTYPE html>
<html>
   <head></head>
   <body>
      <a href="mailto:foo@example.com,bar@example.com"></a>
   </body>
</html>

Expected behaviour

mailto:foo@example.com,bar@exmple.com is a valid mailto URI as per RFC6068. No error or warning should be raised by htmltest.

Actual behaviour

The link is flagged as invalid:

invalid email address (invalid format): 'foo@example.com,bar@example.com' --- index.html --> mailto:foo@example.com,bar@example.com

Versions

Additional context

The link is declared as invalid by htmltest because the individual recipients are not split up. I will try to provide a PR for this Issue. I expect the PR to be of medium size.