Contact module messages not removing HTML tags

Created on 17 October 2022, about 2 years ago
Updated 22 May 2023, over 1 year ago

Only just started happening, but whenever an email is sent through the core Contact module, the received message is being sent with all HTML tags present, like this (username (user url) sen a message... is unaffected and displays correctly):

<div class="field field--name-message field--type-string-long field--label-above">
   <div class="field--label">Message</div>
             <div class="field--item">MESSAGE</div>
         </div>

Using:
Drupal: 9.4.8
SMTP: 8.x-1.1
Ludwig: 2.0.5
PHPMailer library: 6.6.3

If I go into SMTP settings and turn OFF the HTML option, core Contact module sends correctly, with HTML tags stripped, BUT Webform module then starts sending messages with all HTML stripped (which is correct behaviour) and so all fields are then displayed in one long row.

Things tried:
Uninstalled SMTP and reinstalled (Ludwig)
Uninstalled SMTP and reinstalled (Composer)
Tested sending messages WITHOUT SMTP, sends correctly
Reinstalled Drupal core from scratch
Updated all input types
Added a secondary Message field in core Contact, using CKEditor, same issue

Notes:

  • I KNOW that this was working before a recent Ludwig update from 1.8 to 2.0.5, but don't know if that is the problem. As noted, tried uninstalling and reinstalling without Ludwig. Other modules dependent on Ludwig all working correctly following testing.
  • Can't remember if it has happened before, but with SMTP installed, and then enabling a new module, a help notice popup up to say 'Thanks for installing SMTP Authentication Support Server settings on SMTP Authentication Support' on EVERY new module enabling, even though SMTP is already installed.
  • Can't remember if it has happened before, but a help notice 'Disabled fields are overridden in site-specific configuration file.' is displayed on settings screen, even though none of the fields are disabled and nothing has been overridden by myself in settings.php
  • No errors in log. Email authenticates correctly with server and sends.

Any help or suggestions, much appreciated.

💬 Support request
Status

Active

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom stuhannaford

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Not currently mergeable.
  • @valdes14 opened merge request.
Production build 0.71.5 2024