- Issue created by @BenStallings
siri.singampalli@gmail.com → made their first commit to this issue’s fork.
Because the "Mail Body" editing field accepts HTML but is not WYSIWYG and bypasses the filters, users who are not HTML savvy can make simple typos in the templates that result in a WSOD and obscure errors like
Drupal\Core\Entity\EntityStorageException: The user-entered string '”https://example.com' must begin with a '/', '?', or '#'. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of /app/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Edit a PET template, and in the Mail Body field, enter a link with a curly quote in place of a straight quote, such as
<a href=“https://example.com">link text</a>
Attempt to send an email with that template. The log will show an error message like the one quoted above.
Ideally, the Mail Body field would use Drupal core's WYSIWYG editor and text filters. Failing that, some sort of validation check on the form could display an error if HTML tags contain non-HTML-safe characters.
Make a fork or patch.
Either implement core editing functionality or add a validation check to the form.
Active
4.0
Code
siri.singampalli@gmail.com → made their first commit to this issue’s fork.