HTML emails have br tags inserted after closing paragraph tags | Troubleshooting Subscribe2 HTML | Support | Semper Plugins

Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
HTML emails have br tags inserted after closing paragraph tags
August 13, 2015
4:44 pm
Avatar
cvogel
Member
Guests
Forum Posts: 3
Member Since:
August 6, 2015
sp_UserOfflineSmall Offline

The post content is stored normally, and when rendered to the page, it contains no extraneous BR tags. However, every closing paragraph tag in the outgoing emails has a BR tag immediately following it. We use Mandrill to send all wp_mail email, but I’m pretty sure it’s not doing it, as we’ve disabled the setting to add line breaks, and other emails aren’t having this issue, only emails generated by the Subscribe2 HTML plugin, and it creates far too much whitespace between paragraphs.

August 13, 2015
5:03 pm
Avatar
Matthew Robinson
UK
Admin
Forum Posts: 443
Member Since:
December 13, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

August 13, 2015
5:07 pm
Avatar
cvogel
Member
Guests
Forum Posts: 3
Member Since:
August 6, 2015
sp_UserOfflineSmall Offline

But this is inside of the actual content, not around it. In the template, it’s just the {POST} keyword. Whatever process is replacing {POST} with the post content appears to be inserting BRs after closing Ps, within the post content.

August 14, 2015
3:19 am
Avatar
Matthew Robinson
UK
Admin
Forum Posts: 443
Member Since:
December 13, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

August 14, 2015
5:40 pm
Avatar
cvogel
Member
Guests
Forum Posts: 3
Member Since:
August 6, 2015
sp_UserOfflineSmall Offline

The front-end form submission is storing HTML as part of the post_content. I’m not sure at what point or which plugin is actually adding the extraneous BR tags after paragraph close tags (it’s not happening when the_content is rendered to a page), but since we’re using WPMandrill (the “content” checkbox is not checked in WPMandrill settings, btw), I simply used the mandrill_payload filter to do a str_replace on $message[‘html’], replacing closing Ps followed by self-closing BRs with only closing Ps.

I know that’s a fairly narrow set of circumstances, but if anybody else runs into that problem ( front-end post submission -> extra break tags in html emails -> sending via WPMandrill ), that’s one way to clear it up.

August 15, 2015
2:26 am
Avatar
Matthew Robinson
UK
Admin
Forum Posts: 443
Member Since:
December 13, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

Forum Timezone: America/New_York

Most Users Ever Online: 964

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Member Stats:

Guest Posters: 35

Members: 18944

Moderators: 0

Admins: 8

Forum Stats:

Groups: 4

Forums: 28

Topics: 1823

Posts: 7738

Newest Members:

Harte Londo

Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve KlasenArnaud BroesAsh R

[i]
[i]
Skip to toolbar