Issue with Unwanted Tags in Emails
-
The plugin is inserting unwanted
<br>
tags into the emails, which is causing formatting problems. Specifically, when sending HTML emails, I am seeing double<br>
tags, and even when switching to plain text emails, the<br>
tags are still present.To investigate this, I looked into the plugin’s code and found that the issue seems to be occurring in the file “kp-gfsmtp-send-override.php”. On line 389, the original code is:
$_message = ( ! empty( $_notice['message'] ) ) ? GFCommon::replace_variables( $_notice['message'], $_form, $_entry ) : '';
I modified this line to directly use
$_notice['message']
as follows:$_message = ( ! empty( $_notice['message'] ) ) ? $_notice['message'] : '';
After making this change, the emails are formatted correctly without any unwanted
<br>
tags. However, I am concerned about the implications of this modification. It appears that bypassing theGFCommon::replace_variables()
function resolves the issue with the<br>
tags, but I am unsure if this is the best solution or if it could lead to other issues, especially considering future updates and the overall functionality of the plugin.Could you please provide some guidance on how to properly address this issue? Is there a recommended way to prevent these unwanted
<br>
tags from being inserted into emails, or is there a fix available for this problem?Thank you for your assistance.
- The topic ‘Issue with Unwanted Tags in Emails’ is closed to new replies.