paid-memberships-pro icon indicating copy to clipboard operation
paid-memberships-pro copied to clipboard

Email From Name Doesn't Strip Slashes

Open JarrydLong opened this issue 4 years ago • 2 comments

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:

  1. Go to Memberships -> Settings -> Emails
  2. Set the 'From Name:' field to something with an apostrophe "My website's Email"
  3. Save. You'll find that the returned value has slashes before the apostrophe.

Screenshots qmws-slashes qmws-slashes-2

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

PMPro V2.2.6 WP V5.3.2 Membership Lite V4.3

JarrydLong avatar Feb 28 '20 08:02 JarrydLong

Similar issue - Moderators Only - #416152

The site name !!sitename!! attribute pulled into the email subject outputs &# in all PMPro email templates (screenshots attached).

Screen Shot 2022-04-15 at 15 08 00 Screen Shot 2022-04-15 at 15 09 34

If the ' is removed from the Site Title, the output is displayed properly without the &#

MaryOJob avatar Apr 15 '22 13:04 MaryOJob

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

ipokkel avatar Jun 27 '23 10:06 ipokkel