paid-memberships-pro
paid-memberships-pro copied to clipboard
Email From Name Doesn't Strip Slashes
Describe the bug If the from name has an apostrophe in it, slashes aren't stripped from the settings page, nor in emails that are sent.
To Reproduce Steps to reproduce the behavior:
- Go to Memberships -> Settings -> Emails
- Set the 'From Name:' field to something with an apostrophe "My website's Email"
- Save. You'll find that the returned value has slashes before the apostrophe.
Screenshots
Expected behavior Slashes should be stripped from values that contain an apostrophe
Isolating the problem (mark completed items with an [x]):
- [x] I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
- [x] This bug happens with a default WordPress theme active, or Memberlite.
- [x] I can reproduce this bug consistently using the steps above.
WordPress Environment
Similar issue - Moderators Only - #416152
The site name !!sitename!! attribute pulled into the email subject outputs &# in all PMPro email templates (screenshots attached).


If the ' is removed from the Site Title, the output is displayed properly without the &#
As a temporary workaround for the email "From Name" and the email placeholder !!sitename!!
variable the following custom code recipe may be used to replace the unwanted character.
https://gist.github.com/ipokkel/75a69865ba79ab015a502e4b3aa9fbbd